1

I am new in Raspberry Pi and I am trying to send mails without using SMTP. I had used SMTP before and it worked perfectly fine. But recently the same code is not working, though it compiles without any error. I have added the error message below. I want to know are there any ways besides SMTP?

Error Message

asked Nov 14, 2019 at 11:16
1
  • 1
    While I'm not a python user, it may be worth noting that a library and what it implements are not synonymous. So while as stevieb points out sending email == using SMTP, using SMTP != using smtplib. Commented Nov 14, 2019 at 15:08

2 Answers 2

4

SMTP, or Simple Mail Transport Protocol is the mail delivery mechanism in use currently on the Internet.

You can't send email without using SMTP in one way or another, either directly, or via a script or program that accesses a tool (for example an API or email-based website) that ties directly with SMTP on its back end.

answered Nov 14, 2019 at 14:52
3
  • Okay, now let me explain the main problem. I have used smtplib before without any issue. But recently the same code is not working. The code do compile without any error but it shows Network Unreachable issue. Previously many people posted this issue but no clear solution is not available. Commented Nov 15, 2019 at 14:59
  • @opu웃 You should edit your question to add this new information. Many people don't read comments thoroughly and may miss this information. Commented Nov 15, 2019 at 16:18
  • I have edited the question. Thank you for the suggestion. Commented Nov 16, 2019 at 10:18
1

You don't say what OS or list any code, but do tag ssmtp which is deprecated in Buster and hasn't been updated in years.

There are replacements. I use msmtp (although not Python). See https://raspberrypi.stackexchange.com/a/100704/8697

answered Nov 14, 2019 at 23:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.