MailerInterface class abstract interface

Interface for mail sending operations.

Defines the contract for sending emails through various mail drivers. Implementations should handle the actual email transmission.

Example:

final mailer = Mail.mailer();
await mailer.to('user@example.com')
    .subject('Welcome!')
    .text('Welcome to our app')
    .send();
Implementers

Properties

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

Methods

attach(String path, {String? name, String? mimeType}) MailerInterface
Attaches a file to the email.
attachData(List<int> data, String name, {String? mimeType}) MailerInterface
Attaches raw data as a file.
bcc(dynamic addresses) MailerInterface
Sets the BCC (Blind Carbon Copy) recipient(s).
cc(dynamic addresses) MailerInterface
Sets the CC (Carbon Copy) recipient(s).
embed(String path, String cid) MailerInterface
Embeds an inline image in the email.
from(String address, [String? name]) MailerInterface
Sets the email sender (from address).
Sets a custom header.
html(String content) MailerInterface
Sets the HTML body of the email.
message() MailMessageInterface
Creates a new message builder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
priority(int priority) MailerInterface
Sets the email priority.
queue([Duration? delay]) Future<void>
Queues the email for asynchronous sending.
queueMailable(Mailable mailable, [Duration? delay]) Future<void>
Queues a Mailable instance.
replyTo(String address, [String? name]) MailerInterface
Sets the reply-to address.
send() Future<bool>
Sends the email immediately.
sendMailable(Mailable mailable) Future<bool>
Sends a Mailable instance.
subject(String subject) MailerInterface
Sets the email subject.
text(String content) MailerInterface
Sets the plain text body of the email.
to(dynamic addresses) MailerInterface
Sets the recipient(s) of the email.
toString() String
A string representation of this object.
inherited
view(String viewName, [Map<String, dynamic>? data]) Future<MailerInterface>
Renders a view template for the email body.

Operators

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