0

Here is my code:

send: 'mail FROM:<zequbal20@gmail.com> size=453\r\n'
reply: '250 2.1.0 OK m6sm1118977pfm.22 - gsmtp\r\n'
reply: retcode (250); Msg: 2.1.0 OK m6sm1118977pfm.22 - gsmtp
send: 'rcpt TO:<>\r\n'
reply: '555 5.5.2 Syntax error. m6sm1118977pfm.22 - gsmtp\r\n'
reply: retcode (555); Msg: 5.5.2 Syntax error. m6sm1118977pfm.22 - gsmtp
send: 'rcpt TO:<>\r\n'
reply: '555 5.5.2 Syntax error. m6sm1118977pfm.22 - gsmtp\r\n'
reply: retcode (555); Msg: 5.5.2 Syntax error. m6sm1118977pfm.22 - gsmtp
send: 'rset\r\n'
reply: '250 2.1.5 Flushed m6sm1118977pfm.22 - gsmtp\r\n'
reply: retcode (250); Msg: 2.1.5 Flushed m6sm1118977pfm.22 - gsmtp
{"('mezequbal20@gmail.co',)": (555, '5.5.2 Syntax error. m6sm1118977pfm.22 - gsmtp'), "('mezequbal@gmail.com',)": (555, '5.5.2 Syntax error. m6sm1118977pfm.22 - gsmtp')}
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
  • def alertMail(sender,recipients,subject,body): msg = MIMEMultipart() msg.attach(MIMEText(body, 'plain')) #body = "YOUR MESSAGE HERE" msg['Subject'] = subject msg['From'] = sender #sender = 'me@example.com' msg['To'] = ", ".join(recipients) server = smtplib.SMTP('smtp.gmail.com:587') server.ehlo() server.starttls() server.login(sender, "My Password") server.set_debuglevel(1) #1 is debug level server.sendmail(sender, recipients, msg.as_string()) server.quit() – Zafar Equbal Feb 22 '17 at 07:09
  • post your python error.. – Mushir Feb 22 '17 at 08:03
  • There is an edit button under your question to allow you to make changes. This is better than including code as a comment. – Martin Evans Feb 24 '17 at 11:09

0 Answers0