+ 1
friends, I get this error: sendmail() missing 1 required positional argument: 'msg'
def send_mail(): server = smtplib.SMTP_SSL('smtp.gmail.com',465) server.ehlo() #server.starttls() server.ehlo() server.login('xxxxxxx','xxxxxxx') subject = "The Shirt you want is below $15! Now is your chance to buy!" body = "Alex, This is the moment we have been waiting for. Now is your chance to pick up the shirt of your dreams. Don't mess it up! Link here: https://www.amazon.com/Funny-Data-Systems-Business-Analyst/dp/B07FNW9FGJ/ref=sr_1_3?dchild=1&keywords=data+analyst+tshirt&qid=1626655184&sr=8-3" msg = f"Subject: {subject}\n\n{body}" server.sendmail( 'xxxxxxxxxxxx', msg )
2 Réponses
+ 3
server.sendmail(sender_email, receiver_email, message)
0
Oma Falk thank you very much. Can I ask two other questions?