Im trying to write an applescript that sends emails without the mail app. I googled a lot and found two links.
First link: http://www.hamsoftengineering.com/codeSharing/pythonEmail/pythonEmail.html
When I implement this in my code and run it I always get this error:
error "Traceback (most recent call last):
File \"/Users/Kian/Desktop/pythonEmail.py\", line 58, in <module>
server.login(username, passwd)
File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/smtplib.py\", line 622, in login
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, 'Authentication credentials invalid')" number 1
The second link: Use Applescript to send mail without mail.app
When I implement this in my code I always get the followig error from my compiler:
Syntax Error
The run handler is specified more than once, or there were top-level commands in addition to the run handler.
What should I do? Does someone know where the problem is? Im new to applescript and dont understand the errormessage and cant find the problem. Is it possible find the problem and to correct it? Or does someone have a Code that wokrks?
Thanks