type message textend with line=[ctrl+ (unix)ctrl+ (windows)fiddle de dumfiddle de deeeric the half bee ^ connecting no errors bye this mail is sent to the book' email account address (pp @learning-python com)so it ultimately shows up in the inbox at my ispbut only after being routed through an arbitrary number of machines on the netand across arbitrarily distant network links it' complex at the bottombut usuallythe internet "just works notice the from addressthough--it' completely fictitious (as far as knowat leastit turns out that we can usually provide any from address we like because smtp doesn' check its validity (only its general format is checkedfurthermoreunlike popthere is usually no notion of username or password in smtpso the sender is more difficult to determine we need only pass email to any machine with server listening on the smtp portand we don' need an account or login on that machine herethe name eric the half bee@yahoo com works just fine as the sendermarketing geek from hell@spam com might work just as well in facti didn' import from email address from the mailconfig py module on purposebecause wanted to be able to demonstrate this behaviorit' the basis of some of those annoying junk emails that show up in your mailbox without real sender' address |marketers infected with -millionaire mania will email advertising to all addresses on list without providing real from addressto cover their tracks normallyof courseyou should use the same to address in the message and the smtp call and provide your real email address as the from value (that' the only way people will be able to reply to your messagemoreoverapart from teasing your significant othersending phony addresses is often just plain bad internet citizenship let' run the script again to ship off another mail with more politically correct coordinatesc:\pp \internet\emailsmtpmail py frompp @learning-python com topp @learning-python com subjtesting smtpmail type message textend with line=[ctrl+ (unix)ctrl+ (windows)lovely spamwonderful spam^ connecting no errors bye |we all know by now that such junk mail is usually referred to as spambut not everyone knows that this name is reference to monty python skit in which restaurant' customers find it difficult to hear the reading of menu options over group of vikings singing an increasingly loud chorus of "spamspamspam hence the tie-in to junk email spam is used in python program examples as sort of generic variable namethough it also pays homage to the skit client-side scripting