Guest User

Untitled

a guest
Oct 19th, 2017
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. msg = MIMEMultipart('related')
  2. msg['Subject'] = "Welcome to my website"
  3. msg['from'] = "activity@mydomain.com"
  4.  
  5. part = MIMEText("Body of the email",'plain')
  6. msg.attach(part)
  7.  
  8. fromaddr = "activity@mydomain.com"
  9. toaddrs = "someone@gmail.com"
  10. username = "activity@mydomain.com"
  11. password = "password"
  12.  
  13. # The actual mail send
  14. try:
  15. server = smtplib.SMTP('mydomain.com',587)
  16. server.starttls()
  17. server.login(username,password)
  18. #server.ehlo()
  19. server.sendmail(fromaddr, toaddrs, msg.as_string() )
  20. server.quit()
  21. except:
  22. print "Error: unable to send email"
  23.  
  24. Oct 19 22:11:52 box postfix/smtp[28666]: Untrusted TLS connection established to alt1.gmail-smtp-in.l.google.com[74.125.198.26]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
  25. Oct 19 22:11:52 box postfix/smtp[28666]: B3F0F10583D: to=<someone@gmail.com>, relay=alt1.gmail-smtp-in.l.google.com[74.125.198.26]:25, delay=602, delays=598/0.01/4/0.5, dsn=4.7.0, status=deferred (host alt1.gmail-smtp-in.l.google.com[74.125.198.26] said: 421-4.7.0 [202.89.139.221 15] Our system has detected that this message is 421-4.7.0 suspicious due to the very low reputation of the sending IP address. 421-4.7.0 To protect our users from spam, mail sent from your IP address has 421-4.7.0 been temporarily rate limited. Please visit 421 4.7.0 https://support.google.com/mail/answer/188131 for more information. t16si4047297oih.239 - gsmtp (in reply to end of DATA command))
Add Comment
Please, Sign In to add comment