SmtpTransport class

SMTP transport for sending emails via SMTP protocol.

Supports standard SMTP features including:

  • TLS/SSL encryption
  • Authentication
  • Configurable ports and timeouts

Example configuration:

final config = SmtpConfig(
  host: 'smtp.gmail.com',
  port: 587,
  username: 'user@gmail.com',
  password: 'app-password',
  encryption: 'tls',
);
final transport = SmtpTransport(config);
Implemented types

Constructors

SmtpTransport(SmtpConfig _config)

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
Gets the transport name/identifier.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(MailMessageInterface message) Future<bool>
Sends an email message.
override
test() Future<bool>
Tests the transport connection.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited