python直接通过邮件服务器端口发送邮件
fromAddress = 'sender@example.com' toAddress = 'me@my.domain' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib server = smtplib.SMTP("localhost", 25) server.sendmail(fromAddress, toAddress, msg)
python直接通过邮件服务器端口发送邮件
fromAddress = 'sender@example.com' toAddress = 'me@my.domain' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib server = smtplib.SMTP("localhost", 25) server.sendmail(fromAddress, toAddress, msg)