message-idx-fromip -nonspamnone lovely spamwonderful spambye notice how the fields we input to our script show up as headers and text in the email' raw text delivered to the recipient technicallysome isps test to make sure that at least the domain of the email sender' address (the part after "@"is realvalid domain nameand disallow delivery if not as mentioned earliersome servers also require that smtp senders have direct connection to their network and may require an authentication call with username and password (described near the end of the preceding sectionin the second edition of the booki used an isp that let me get away with more nonsensebut this may vary per serverthe rules have tightened since then to limit spam manipulating both from and to the first mail listed at the end of the preceding section was the one we sent with fictitious sender addressthe second was the more legitimate message like sender addressesheader lines are bit arbitrary under smtp our smtpmail script automatically adds from and to header lines in the message' text with the same addresses that are passed to the smtp interfacebut only as polite convention sometimesthoughyou can' tell who mail was sent toeither--to obscure the target audience or to support legitimate email listssenders may manipulate the contents of both these headers in the message' text for exampleif we change smtpmail to not automatically generate "to:header line with the same address(essent to the smtp interface calltext ('from% \ndate% \nsubject% \ (fromdatesubj)we can then manually type "to:header that differs from the address we're really sending to--the "toaddress list passed into the smtplib send call gives the true recipientsbut the "to:header line in the text of the message is what most mail clients will display (see smtpmail-noto py in the examples package for the code needed to support such anonymous behaviorand be sure to type blank line after "to:") :\pp \internet\emailsmtpmail-noto py fromeric the half bee@aol com topp @learning-python com subja type message textend with line=(ctrl or ztonobody in particular@marketing com spamspam and eggsspamspamand spam ^ client-side scripting