[Tutor] improt email, strange from field

Chad Crabtree flaxeater at yahoo.com
Thu Aug 19 16:41:38 CEST 2004


When I send emails from my cgi script I try to set the from field to
my 
business name however it says it's from
"Imperial Data Services"@server-14.mcc-sys.com even though that is
not 
the email address that sent it.
What I would like instead is something either 'Just The Name'  like
when 
I receive personal emails and it shows the name of the person.  Or
perhaps the email I cent it from.


Here's the pertinent code

  email=MIMEText(message)
  email['Subject']='%s thought you might like this!' %fromname
  email['From']='"Imperial Data Services"'
  email['To']=toaddr
  s = smtplib.SMTP('smtp.imperialws.com')
  #s.set_debuglevel(1)
  s.login('info at imperialws.com',passwd)
  s.sendmail('info at imperialws.com',toaddr, email.as_string())
  s.close()

Any help would be greatly appreciated.


		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush


More information about the Tutor mailing list