bin noch nicht so fit, und würde gerne eine email mit Anhang versenden.
Ich habe Python version 2.7.9 und folgendes script aus dem IN
Code: Alles auswählen
import smtplib
fromaddr = "*@gmail.com"
toaddrs = "*@gmail.com"
msg = "help I cannot send an attachment to save my life"
attachment = "/home/pi/v1.txt"
#print type (attachment)
username = "*@gmail.com"
password = "*"
server = smtplib.SMTP('smtp.gmail.com:587')
server.starttls()
server.login(username,password)
server.sendmail(fromaddr, toaddrs, msg, attachment)
server.quit()
Traceback (most recent call last):
File "*", line 15, in <module>
server.sendmail(fromaddr, toaddrs, msg, attachment)
File "/usr/lib/python2.7/smtplib.py", line 736, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (555, '5.5.2 Syntax error. u145sm13059786wmu.1 - gsmtp', '*')
hat jemand eine Idee?
thanks georg