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

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

@amousset
Copy link
Member

amousset commented Dec 4, 2016

Sure!

@TheNeikos
Copy link
Author

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 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

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

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 reopened this Dec 5, 2016
@amousset
Copy link
Member

amousset commented Dec 5, 2016

That would be great to add this.

@quadrupleslap
Copy link

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

@TheNeikos
Copy link
Author

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 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 as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants