don' enter this example in the interactive shellit won' workbecause smtp example combob@example commy_secret_passwordand alice@example com are just placeholders this code is just an overview of the process of sending email with python import smtplib smtpobj smtplib smtp('smtp example com' smtpobj ehlo(( 'mx example com at your service ]\nsize bitmime\nstarttls\nenhancedstatuscodes\nchunking'smtpobj starttls(( bready to start tls'smtpobj login('bob@example com''my_secret_password'( baccepted'smtpobj sendmail('bob@example com''alice@example com''subjectso long \ndear aliceso long and thanks for all the fish sincerelybob'{smtpobj quit(( bclosing connection ko sm pbd gsmtp'in the following sectionswe'll go through each stepreplacing the placeholders with your information to connect and log in to an smtp serversend an emailand disconnect from the server connecting to an smtp server if you've ever set up thunderbirdoutlookor another program to connect to your email accountyou may be familiar with configuring the smtp server and port these settings will be different for each email providerbut web search for smtp settings should turn up the server and port to use the domain name for the smtp server will usually be the name of your email provider' domain namewith smtp in front of it for exampleverizon' smtp server is at smtp verizon net table - lists some common email providers and their smtp servers (the port is an integer value and will almost always be it' used by the command encryption standardtls table - email providers and their smtp servers provider smtp server domain name gmailsmtp gmail com outlook com/hotmail comsmtp-mail outlook com yahoo mailsmtp mail yahoo com at& smpt mail att net (port comcast smtp comcast net verizon smtp verizon net (port *additional security measures prevent python from being able to log in to these servers with the smtplib module the ezgmail module can bypass this difficulty for gmail accounts sending email and text messages