Skip to content

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

emailer

A library for sending email over SMTP. Heavily inspired by and partially copied from @kaisellgren/mailer.

Example

import'emailer.dart';
main() {
SmtpOptions options =newSmtpOptions()
..hostName ='smtp.server.dk'
..port =25;
SmtpClient smtpClient =newSmtpClient(options);
Email email =newEmail(newAddress('from@domain.tld',
'Some From Name'), 'fqdn.somewhere')
..attachments.add(newAttachment.file(newFile('afile.stuff')))
..to = [newAddress('to@domain.tld', 'Some To Name')]
..bcc = [newAddress('bcc@domain.tld', 'Some Bcc Name')]
..cc = [newAddress('cc@domain.tld', 'Some Cc Name')]
..subject ='Subject!'
..partHtml ='This is <strong>bold</strong>!'
..partText ='This is bold!';
smtpClient.send(email)
.then((_) => log.info('\o/'))
.catchError((e) => log.info('/o\'));}

About

A simple library for sending email over SMTP

Resources

Stars

2 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages