Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benmerckx/smtpmailer
Haxe SMTP mailer with support for SSL & StartTLS
https://github.com/benmerckx/smtpmailer
Last synced: 20 days ago
JSON representation
Haxe SMTP mailer with support for SSL & StartTLS
- Host: GitHub
- URL: https://github.com/benmerckx/smtpmailer
- Owner: benmerckx
- Created: 2016-05-17T17:41:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T19:44:10.000Z (about 2 years ago)
- Last Synced: 2024-10-19T16:51:58.474Z (2 months ago)
- Language: Haxe
- Homepage:
- Size: 140 KB
- Stars: 18
- Watchers: 8
- Forks: 7
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# smtpmailer
Runs on sys targets and nodejs. Requires haxe 4+
```haxe
final email = {
subject: 'Subject',
from: {address: '[email protected]', displayName: "It's me, Mario!"},
to: [{address:'[email protected]', displayName:"Luigi Plumber"}],
content: {
text: 'hello',
html: 'hello'
},
attachments: ['image.png']
}smtpmailer.SmtpMailer.connect({
host: 'hostname',
port: 587,
auth: {
username: 'user',
password: 'pass'
}
}).next(mailer ->
mailer.send(email).next(
_ -> mailer.close()
)
).handle(function(res) {
switch res {
case Success(_):
trace('Email sent!');
case Failure(e): {
trace('Something went wrong: '+e);
}
}
});
```