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

Mailgun Integration #108

Closed
TheNeikos opened this issue Dec 4, 2016 · 9 comments
Closed

Mailgun Integration #108

TheNeikos opened this issue Dec 4, 2016 · 9 comments

Comments

@TheNeikos
Copy link

@TheNeikos TheNeikos commented Dec 4, 2016

Is that something you'd be interested in this repository?

@amousset
Copy link
Member

@amousset amousset commented Dec 4, 2016

Sure!

@TheNeikos
Copy link
Author

@TheNeikos TheNeikos commented Dec 4, 2016

Okay, so I am almost done. However there is a large roadblock...

Mailgun wants the individual inputs and not through an SMTP format, however I am unable to get access to that as SendableEmail only gives access to the whole message at one.

@amousset
Copy link
Member

@amousset amousset commented Dec 4, 2016

I added the SimpleEmail struct for this kind of needs (access to individual fields if I understand it correctly), but I see there is currently no way to get data from except by converting it to a SendableEmail.

Is the content of this struct matching what you need? If so, we probably need another trait (like SendableEmail, and likely named SimpleSendableEmail), and transport methods that use this trait to send emails through HTTP APIs (like Mailgun).

@TheNeikos
Copy link
Author

@TheNeikos TheNeikos commented Dec 5, 2016

Yup, those are what I need. The Mailgun API is really simple too: https://documentation.mailgun.com/api-sending.html#sending

@TheNeikos
Copy link
Author

@TheNeikos TheNeikos commented Dec 5, 2016

Additionally, sending extra information with each e-mail would also be nice if that is supported.

Do you mind if I add all that to the PR?

@TheNeikos TheNeikos closed this Dec 5, 2016
@TheNeikos TheNeikos reopened this Dec 5, 2016
@amousset
Copy link
Member

@amousset amousset commented Dec 5, 2016

That would be great to add this.

@quadrupleslap
Copy link

@quadrupleslap quadrupleslap commented Feb 11, 2017

So, uh, any chance this'll land soon?

@TheNeikos
Copy link
Author

@TheNeikos TheNeikos commented Feb 11, 2017

The initial plan is working, however I just did not find the time to work on extending the project with new traits. And I don't see it in the foreseeable future.

Anyone is free to fork what I wrote and build off that.

As a 'workaround' Mailgun also allows SMTP login.

@natboehm
Copy link

@natboehm natboehm commented Aug 4, 2017

If anyone wants or needs a simple example, I was able to get Lettre working on Heroku with the Mailgun app using SMTP :)

https://github.com/natboehm/rust-email-sender/blob/master/src/main.rs

@amousset amousset closed this May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.