New question #272353 on Sikuli: https://answers.launchpad.net/sikuli/+question/272353
I want to import the smtplib to the sikuli script I'm writing so Sikuli can send email automatically when the test is finished. However, I encounter a problem that Sikuli cannot find the smtplib module in Python which I am sure it is installed and located in the Python27/Lib directory. Below is the code I am using. I use SikuliX 1.1.0 and Python 2.7. ------------------------------------------------------------------------- import smtplib sender = '[email protected]' receivers = ['[email protected]'] message = """From: From Person <[email protected]> To: To Person <[email protected]> Subject: SMTP e-mail test This is a test e-mail message. """ try: smtpObj = smtplib.SMTP('test.com.hk') smtpObj.sendmail(sender, receivers, message) print "Successfully sent email" except: print "Error: unable to send email" ------------------------------------------------------------------------- When I run it in Sikuli IDE, it gives me: "[error] script [ send ] stopped with error in line 2 [error] ImportError ( No module named utils ) [error] --- Traceback --- error source first line: module ( function ) statement 46: smtplib ( <module> ) import email.utils [error] --- Traceback --- end --------------" Can anyone help? Thanks -- You received this question notification because your team Sikuli Drivers is an answer contact for Sikuli. _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : [email protected] Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp

