SMTP - Topic & add files

jmdeschamps jmdeschamps at cvm.qc.ca
Sat Jan 3 16:39:42 EST 2004


"EsC" <christian.eslbauer at liwest.at> wrote in message news:<1073137983.983243 at news.liwest.at>...
> Hy!
> 
> probably a dummy question, but i don't
> know how to set a Topic-Text and add
> Files to an email ...
> 
> i use the SMTPLIB module and the
> function/method: .sendmail(from,to,msg)
> 
> but how can i set a topic Text?
> is there an other function/method, or
> must it be encoded within the message-text?
> 
> thanks for your help
> EsC

its in the msg parameter of sendmail such as :

yourSmtp = smtplib.SMTP('yourMailServer.org')

#envoi un message
#ARGUMENTS from sendMail
#from: your own client adress
#to: the intended recipient's adress
#msg: what will really show...in different fields
monSmtp.sendmail("From: ownMail at yourMailServer.org",
                       "To: recipientAdresse at hisServer.org",
                       "From:joe\r\nTo: Owner \nSubject: 3 weeks left"
                       + "\n\nTopic text of the  message! ")

on Windows, may differ slightly on Linux :)

Good messaging,

JM



More information about the Python-list mailing list