Closed rafaelgsra closed 2 years ago
Hello! Thanks for waiting, I was on holidays.
Yes, seems worth considering of course. I have no experience with the MIME messages options of Mailgun so it may need some time. PRs are welcome, of course.
Hi!
Eventually we decided to just call directly Mailgun API using UniRest. Once the message is MIME formatted, it is just a matter of calling POST /messages.mime as multipart/form-data setting the parameters "to" (with the receivers' email addresses) and "message" (with the MIME-formatted email).
Thanks anyways!
Oh ok, thanks for reporting.
I will keep the issue open just to evaluate its implementation as it may prove useful for anybody else.
Hi, does that mean that we can't send attachement with that lib (such as PDF files)?
@rafaelgsra it would be nice if you can share your solution.
Thanks!
No, you CAN send attachments with the current library.
There is an example of sending an email with an attachment on the front page of the project. Second example.
Mailgun supports sending MIME messages calling /messages.mime instead of /messages. To build a Mail object, it should be just a matter of passing the MIME-formatted message to MailBuilder.text(), or if there is some handling that would break the format, then adding a new MailBuilder.mime(). Also in this case no subject is needed.
What do you think, worth considering?
Thanks for the good library!