R
R
rkfddf2020-06-20 15:30:47
Python
rkfddf, 2020-06-20 15:30:47

How to fix smtp python error 550?

I'm trying to send an email via python smtp

import smtplib
server = smtplib.SMTP_SSL('smtp.ukr.net', 465)
server.login("***[email protected]", "***pYCLT2")
server.sendmail(
   '[email protected]', 
  '***[email protected]', 
   'this message is from python '
  )
server.quit()

and i get an error
smtplib.SMTPDataError: (550, b"We do not allow to send messages without 'From' header")

Where and how to insert this heading?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2020-06-20
@rkfddf

Email: Examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question