Jump to content

error when using import smtplib


sindhu murali

Recommended Posts

Hi all,

Got struck when running the below script. Please share inputs on this,it will be very useful.

CODE:

import sysimport smtplibfrom smtplib import SMTP

server = smtplib.SMTP('smtp.gmail.com', 587)server.starttls()server.login("from@gmail.com", "pwd")msg = "YOUR MESSAGE!"server.sendmail("from@gmail.com", "to@gmail.com", msg)server.quit()

ERROR:

Traceback (most recent call last): File "Spotfire.Dxp.Application.ScriptSupport", line unknown, in ExecuteForDebugging File "", line 2, in ImportError: No module named smtplib

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...