By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,285 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

Python built email message doesn't support OutLook Express

P: n/a
Dear All,

I am working in web based email system project.
Here I try to build email message
from scratch. I used below code to build email
message

msg = email.MIMEBase('text','html')
msg['Return-Path'] = user+'@'+domain
msg['Date'] = formatdate(localtime=1)
msg['Subject'] = subject
msg['From'] = from_name
msg['To'] = to
msg['Cc'] = cc
msg.set_payload("Body of the email messagge")
fh = os.popen('/bin/sendmail %s'% (eachid),'w')
fh.write(msg.as_string())
fh.close()

This code will build plain email message properly.
But after building the message. If a email user
download this mail through out look express then
this email message will display without any alignment.
If a user type 3 paragraph message
outlook express display as a single line. What
could be problem?. Kindly let me know ASAP

regards
Prabahar


__________________________________________________ _____
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE! http://in.mail.yahoo.com
Aug 29 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
praba kar enlightened us with:
This code will build plain email message properly.
It's not a plain email message. It's an html email without a plain
text part. Highly annoying to many people.
But after building the message. If a email user download this mail
through out look express then this email message will display
without any alignment.


Post the msg.as_string() output so we can see whay you're sending.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
Aug 29 '05 #2

P: n/a
That is not what Sybren requested - we need the message text. If you
send html, make sure your paragraphs are html paragraphs (enclosed in
<p>-tags) and not pure whitespace, as html ignores these.

Diez

Aug 29 '05 #3

P: n/a
On Wed, 31 Aug 2005 05:42:54 +0100 (BST), praba kar
<pr*********@yahoo.co.in> declaimed the following in comp.lang.python:

--- "Diez B. Roggisch" <de***@web.de> wrote:
That is not what Sybren requested - we need the
message text. If you
send html, make sure your paragraphs are html
paragraphs (enclosed in
<p>-tags) and not pure whitespace, as html ignores
these.
I am sending text message as a paragraph

And you /still/ haven't shown us the exact contents of that
"paragraph", including all "non-printables".
-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Sep 1 '05 #4

P: n/a
praba kar wrote:
--- "Diez B. Roggisch" <de***@web.de> wrote:
That is not what Sybren requested - we need the
message text. If you
send html, make sure your paragraphs are html
paragraphs (enclosed in
<p>-tags) and not pure whitespace, as html ignores
these.


I am sending text message as a paragraph


We. Need. To. See. The. Actual. String.

Otherwise, we cannot help you.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

Sep 1 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.