Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108986

Re: Setting Return-Path in email

From Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be>
Newsgroups comp.lang.python
Subject Re: Setting Return-Path in email
Date 2016-05-23 11:11 +0200
Message-ID <mailman.14.1463995169.20402.python-list@python.org> (permalink)
References <69c455ff-0fbd-42a5-a3fb-4ad0b89ed48e@googlegroups.com> <5742C924.1000504@telenet.be>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Setting Return-Path in email ragav s <raxmic@gmail.com> - 2016-05-23 01:39 -0700
  Re: Setting Return-Path in email Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2016-05-23 11:11 +0200
  Re: Setting Return-Path in email dieter <dieter@handshake.de> - 2016-05-24 09:23 +0200

csiph-web