Guest User

Untitled

a guest
Feb 19th, 2018
6,234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.84 KB | None | 0 0
  1. >>> import smtplib
  2. >>> import time
  3. >>> absender = 'roof3@gmx.de'
  4. >>> adressat = 'manuelruf@gmx.de'
  5. >>> betreff = 'Teeest'
  6. >>> inhalt = 'Test1'
  7. >>> zeit = time.ctime(time.time())
  8. >>> text = 'From: '+absender+'\n'
  9. >>> text += 'To: '+adressat+'\n'
  10. >>> text += 'Date: '+zeit+'\n'
  11. >>> text += 'Subject: '+betreff+'\n'
  12. >>> text = text + inhalt
  13. >>> print text
  14. From: roof3@gmx.de
  15. To: manuelruf@gmx.de
  16. Date: Tue Oct 25 19:36:57 2011
  17. Subject: Teeest
  18. Test1
  19. >>> server = smtplib.SMTP('mail.gmx.net')
  20.  
  21. Traceback (most recent call last):
  22.   File "<pyshell#13>", line 1, in <module>
  23.     server = smtplib.SMTP('mail.gmx.net')
  24.   File "C:\Python25\lib\smtplib.py", line 244, in __init__
  25.     (code, msg) = self.connect(host, port)
  26.   File "C:\Python25\lib\smtplib.py", line 310, in connect
  27.     raise socket.error, msg
  28. error: (10060, 'Operation timed out')
Add Comment
Please, Sign In to add comment