In python Simple Mail Transfer Protocol (SMTP) is a protocol. Python provide smtplib module to handle the email system and SMTP client session object which is used to send mail to any Internet machine with an SMTP or ESMTP listener daemon along with it also use email systems to send email in server.
You can directly use the code given below for email systems,
import smtplib
smtpObj = smtplib.SMTP( [host [, port [, local_hostname]]] )
In the above code:
host: host means that host running your SMTP server.
port: port means that post providing host argument.
local_hostname: In local_hostname, SMTP server is running on your local machine, then you can specify just localhost as an option.
0 Comment(s)