I noticed that php just has one quick function to send emails and I'm wondering if I can do that in Python. I know that Python has an email module, but I understand that I need to be running an SMTP server to use that, whereas PHP can use sendmail.
I would preferably like to use Python 3 and any help on this would be much appreciated.
this is a full tutorial for sending email in python..it looks like they do have sendmail function too..take a look at
try:
smtpObj = smtplib.SMTP('localhost')
smtpObj.sendmail(sender, receivers, message)
print "Successfully sent email"
except SMTPException:
print "Error: unable to send email"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With