add sender's name in the from field of the email in python

后端 未结 6 1530
忘掉有多难
忘掉有多难 2020-12-31 12:17

I am trying to send email with below code.

import smtplib
from email.mime.text import MIMEText

sender = \'sender@sender.com\'

def mail_me(cont, receiver):
         


        
6条回答
  •  一整个雨季
    2020-12-31 12:53

    This should fix it:

    Replace mail_me(cont,['xyz@xyzcom']) with

    mail_me(cont,'xyz@xyz.com')
    

提交回复
热议问题