473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Python built email message doesn't support OutLook Express

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
4 1359
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Alex Martelli | last post by:
All my mailboxes have been filling up with files of about 130k to 150k, no doubt copies of some immensely popular virus. So, I've no doubt lost lots of real mail because of "mailbox full"...
226
by: Stephen C. Waterbury | last post by:
This seems like it ought to work, according to the description of reduce(), but it doesn't. Is this a bug, or am I missing something? Python 2.3.2 (#1, Oct 20 2003, 01:04:35) on linux2 Type...
40
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the...
6
by: Steve Chatham | last post by:
This ought to be simple, but I've not been able to figure out how to do this. I have a request to create a list from a sql database to be displayed in a datagrid on an asp web page. So far,...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 380 open (-36) / 3658 closed (+65) / 4038 total (+29) Bugs : 965 open ( -9) / 6555 closed (+35) / 7520 total (+26) RFE : 272 open...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.