Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-simple-mail can send email from a RFC822 formatted message. #20

Merged
merged 3 commits into from
Dec 22, 2020

Conversation

vjeantet
Copy link
Contributor

Hello,

This a PR which allow go-simple-mail to send email from a RFC822 message.
I have 2 usecases which needed this change

Usecase 1 : Delayed delivery
my app creates mail.Mail messages but send them only 3 or 4 days after ;

  • it save the Message(RFC822) got with *Email.GetMessage() into DB
  • 3 or 4 days later, it takes it and send them to smtp server.

Usecase 2 : S/MIME Encrypted mail
After retrieving the RFC822 message, i envelope it with S/MIME and get a new RFC822 message.

Hope it helps.

Changes

  • new function mail.SendMessage(from, recipients, msg, client) error
  • Email exports a GetRecipients() function to get all recipients emails

- new function mail.SendMessage(from, recipients, msg, client) error
- Email exports a GetRecipients() function to get all recipients emails
@xhit
Copy link
Owner

xhit commented Dec 22, 2020

LGTM. Thanks!

@xhit xhit merged commit 0cf0d41 into xhit:master Dec 22, 2020
@vjeantet
Copy link
Contributor Author

Yeaaaah !!

Thank you

@vjeantet
Copy link
Contributor Author

i'm working on S/MIME, i'll propose in the next wekks a PR to allow go-simple-mail to Encrypt Mail

@xhit
Copy link
Owner

xhit commented Dec 22, 2020

Perfect, feel free to make this package better :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants