I am trying to send email using python based on the email id I generated via Cpanel for my domain
import smtplib
with smtplib.SMTP('mail.rottengrapes.com',587) as smtp:
smtp.ehlo()
# smtp.starttls()
smtp.ehlo()
smtp.login("formkitty@rottengrapes.com",config.PASSWORD)
subject = 'Testing email'
body = 'Getting data via email'
msg = f'Subject: {subject}\n\n\n\n{body}'
smtp.sendmail("formkitty@rottengrapes.com",'mewow@gmail.com', msg)
print('printed')
I'm getting the following error
raise SMTPDataError(code, resp) smtplib.SMTPDataError: (550, b'Your FROM address ( rottengrapes.com , ) must match your authenticated\nemail domain ( rottengrapes.com ). Treating this as a spoofed email.')