considering the smtp server if you tried the example in this with out modifying ityou're probably scratching your head right now trying to figure out what went wrong it' unlikely that your system has an smtp server connected to localhost the reason for the examples to use localhost is to provide placeholder that you replace later with the information for your particular setup in order to see the example actually workyou need an smtp server as well as real-world -mail account of courseyou could install all the software required to create such an environment on your own systemand some developers who work extensively with -mail applications do just that most platforms come with an -mail package that you can installor you can use freely available substitute such as sendmailan open source product available for download at sendmail com/sm/open_sourcedownloadthe easiest way to see the example work is to use the same smtp server that your -mail application uses when you set up your -mail applicationyou either asked the -mail application to detect the smtp server or you supplied the smtp server on your own the configuration settings for your -mail application should contain the required information the exact location of this infor mation varies widely by -mail applicationso you need to look at the documentation for your particular product no matter what sort of smtp server you even tually findyou need to have an account on that server in most cases to use the functionality it provides replace the information in the exam ples with the information for your smtp serversuch as smtp myisp comalong with your -mail address for both sender and receiver otherwisethe example won' work working with an html message an html message is basically text message with special formatting the following steps help you create an html -mail to send off this example also appears with the downloadable source code as htmlmessage py open python file window you see an editor in which you can type the example code type the following code into the window -pressing enter after each linefrom email mime text import mimetext import smtplib msg mimetext" headinghello there!","html"