Le 23/05/2016 10:39, ragav s a écrit :
Hi all,
How can i add different Return-path and fromid in python.i have pasted the
below code for preview
def sendMail(sub,fromid,to,cc,html):
msg = MIMEMultipart('alternative')
msg['Subject'] = sub
msg['From'] = fromid
msg['To'] = to
toaddress = [to]
if cc:
msg['Cc'] = cc
toaddress = to+","+ cc
toaddress = toaddress.split(",")
type = 'plain'
part = MIMEText(html, type,'utf-8')
msg.attach(part)
s = smtplib.SMTP('localhost')
s.sendmail(fromid,toaddress, msg.as_string())
s.quit()
Try with
msg['Reply-To'] = the adress
Vincent
--
https://mail.python.org/mailman/listinfo/python-list