to method

  1. @override
MailerInterface to(
  1. dynamic addresses
)
override

Sets the recipient(s) of the email.

addresses can be:

  • A single email address as String
  • A Map with 'email' and optional 'name' keys
  • A List of either of the above

Example:

mailer.to('user@example.com');
mailer.to({'email': 'user@example.com', 'name': 'John Doe'});
mailer.to(['user1@example.com', 'user2@example.com']);

Implementation

@override
MailerInterface to(dynamic addresses) => defaultMailer.to(addresses);