|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Certain charaters in the body stop mail from arriving. Why?Hello Sending mail with certain characters in the body causes mail
never to arrive. Why? e.g if body text has a fullstop “.” mail never
arrives. I’m using python 4.2 on windows. Harv import smtplib from email.MIMEText import MIMEText def mail(serverURL=None, sender='', to='', subject='',
text=''): COMMASPACE = ', ' to = COMMASPACE.join(to) msg = MIMEText(text) msg['Subject'] = subject msg['From'] = sender msg['To'] = to mailServer = smtplib.SMTP(serverURL, 25) mailServer.sendmail(sender, to,
msg.as_string()) mailServer.quit() print msg.as_string() Output ---- Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: "Information from ost-cs-emma" From: test@... To: test@... Some text Some more text in body ___________________________________________________________________________________ Harvey West | Technical support - BSkyB Sky Creative | ph 020 7805 8591 | http://www.sky.com Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trade marks of British Sky Broadcasting Group plc and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky Interactive Limited (Registration No. 3554332), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD. _______________________________________________ Email-SIG mailing list Email-SIG@... Your options: http://mail.python.org/mailman/options/email-sig/lists%40nabble.com |
|
|
Re: Certain charaters in the body stop mail from arriving. Why?-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 West, Harvey wrote: > > Sending mail with certain characters in the body causes mail never to > arrive. Why? > e.g if body text has a fullstop "." mail never arrives. > > I'm using python 4.2 on windows. WFM - Python 2.4.2 - Windows XP mailit.py-------------------------------------------------------------- import smtplib from email.MIMEText import MIMEText def mail(serverURL=None, sender='', to='', subject='', text=''): COMMASPACE = ', ' to = COMMASPACE.join(to) msg = MIMEText(text) msg['Subject'] = subject msg['From'] = sender msg['To'] = to mailServer = smtplib.SMTP(serverURL, 25) mailServer.sendmail(sender, to, msg.as_string()) mailServer.quit() print msg.as_string() sender = 'msapiro@...' to = ['msapiro@...'] subject = 'Test Message' text = """This is the message body. It contains full stop. And other punctuation,/'- and some more text. """ server = 'localhost' mail(server, sender, to, subject, text) - ---------------------------------------------------------------------- Test------------------------------------------------------------------ C:\Documents and Settings\Owner\Desktop>python mailit.py Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Test Message From: msapiro@... To: msapiro@... This is the message body. It contains full stop. And other punctuation,/'- and some more text. C:\Documents and Settings\Owner\Desktop> - ------------------------------------------------------------------------ Received mail----------------------------------------------------------- <some Received: headers snipped> Received: from localhost ([127.0.0.1] helo=[192.168.0.4]) by msapiro.net with esmtp (Exim 4.62) (envelope-from <msapiro@...>) id JS9XHD-0001A4-MX for msapiro@...; Thu, 29 Nov 2007 07:24:49 -0800 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Test Message From: msapiro@... To: msapiro@... <X-pstn-* Postini headers snipped> Message-Id: <20071129082455.SM02600@...> Date: Thu, 29 Nov 2007 08:24:51 -0700 X-GPC-MailScanner: Found to be clean X-GPC-MailScanner-From: msapiro@... X-Spam-Status: No This is the message body. It contains full stop. And other punctuation,/'- and some more text. - ------------------------------------------------------------------------ - -- Mark Sapiro <mark@...> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQFHTt7HVVuXXpU7hpMRAgNXAJ44SAQmMm3usiPbI7+cvMrkrZDgoACg+E3D 8NQ8cLkVDsx9dPiSdp81rf4= =ThwX -----END PGP SIGNATURE----- _______________________________________________ Email-SIG mailing list Email-SIG@... Your options: http://mail.python.org/mailman/options/email-sig/lists%40nabble.com |
| Free embeddable forum powered by Nabble | Forum Help |