Python Forum
Sending an email with attachment without using SMTP? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Sending an email with attachment without using SMTP? (/thread-26399.html)



Sending an email with attachment without using SMTP? - PythonNPC - Apr-30-2020

Hello,

I am making an application that generates PDF reports. But my application is on the Raspberry Pi, so the clients need an option that will allow them to send these reports via emails.

I can use smtplib but the problem is that my hosting provider restricts emails to 25 emails per 5 minutes.

If my application is being used by a lot of people to generate reports (which will most likely be the case) I will run out of that max limit.


How can I bypass this?


RE: Sending an email with attachment without using SMTP? - PythonNPC - May-03-2020

Bump?


RE: Sending an email with attachment without using SMTP? - pyzyx3qwerty - May-03-2020

What have you tried? And why did you write bump? (just asking)


RE: Sending an email with attachment without using SMTP? - ndc85430 - May-03-2020

Perhaps you need to consider some mail sending service, which you may have to pay for if the amount you want to send is quite high. Gmail has an HTTP API, but I don't know what their limits are like. Other services providing HTTP APIs include SendGrid and Mailgun.


RE: Sending an email with attachment without using SMTP? - micseydel - May-04-2020

ndc85430 I think gave the most important details, but I wanted to say little bit more...

You can send emails with Python without using that limiting service. That said, in my experience at work, you can probably get away with running your own server if you're tolerant to potentially be flagged as spam, and re-training the mailboxes by manually marking them as non-spam (the people receiving your emails need to do this). Otherwise, yeah, you'll want a reputable service like one already mentioned on this thread.


RE: Sending an email with attachment without using SMTP? - PythonNPC - May-05-2020

(May-03-2020, 07:35 PM)ndc85430 Wrote: Perhaps you need to consider some mail sending service, which you may have to pay for if the amount you want to send is quite high. Gmail has an HTTP API, but I don't know what their limits are like. Other services providing HTTP APIs include SendGrid and Mailgun.

(May-04-2020, 11:33 PM)micseydel Wrote: ndc85430 I think gave the most important details, but I wanted to say little bit more...

You can send emails with Python without using that limiting service. That said, in my experience at work, you can probably get away with running your own server if you're tolerant to potentially be flagged as spam, and re-training the mailboxes by manually marking them as non-spam (the people receiving your emails need to do this). Otherwise, yeah, you'll want a reputable service like one already mentioned on this thread.


Thank you guys, this was exactly what I was looking for.
I don't want to risk get my office emails blocked.

So I will use some other service like the ones ndc85430 mentioned.