Python built email message doesn't support OutLook Express

P

praba kar

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
 
S

Sybren Stuvel

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
 
D

Diez B. Roggisch

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
 
D

Dennis Lee Bieber

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".
--
 
R

Robert Kern

praba said:
I am sending text message as a paragraph

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

Otherwise, we cannot help you.

--
Robert Kern
(e-mail address removed)

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top