Your code is fine, ...
In addition to what Jason wrote, note that the way you need to authenticate
to most email servers has changed substantially since this tutorial example
was written. The OP has a yahoo.com email address. Even assuming you used
something like smtp.yahoo.com as the SMTP server
>
> import smtplib
> server = smtplib.SMTP('localhost')
> server.sendmail('gg77gal...@yahoo.com',
> """To: gg.gal...@gmail.com
> From: gg77gal...@yahoo.com
>
> Beware the Ides of March.
> """)
> server.quit()
>
> when running this I get the following message. Please help:
>
> Traceback (most recent