473,326 Members | 2,127 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.

Problem with exchange mail server

I am new for python. I have written one code which generates RFC2822
file.
I have header in string format.

i am using following code.

emailData[SMTP_HEADER_POS] = emailData[SMTP_HEADER_POS].encode("utf-8")
hdr = email.message_from_string(emailData[SMTP_HEADER_POS])
tmpContentType = msg['Content-Type']
del msg['Content-Type']

for key in hdr.keys():
values = hdr.get_all(key)
if values != None:
if key not in msg:
for value in values:
msg.add_header(key,value)

if msg['Content-Type'] is None or msg['Content-Type'] == '':
msg['Content-Type'] = tmpContentType

is this right way to add the header??

This code is not doing well for exchange server mails. Python could not
parse this mail header. Because first line is 'Microsoft exchange mail
server version 2.0'.
If I remove this line, it works. Could not understand this. Please
help.

Thanks and Regards
Vinayakc

Nov 28 '05 #1
0 1269

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim in Arizona | last post by:
I have no idea how to get started, really, but I am looking for a way to have an email sent via an ASP page via our Exchange 2000 server. I have a fairly simple asp page that displays data from a...
1
by: dananrg | last post by:
I would like to configure e-mail alerts on my SQL Server 2000 box. However, we also run Exchange on the same machine. I've been told there could be conflicts/issues having Outlook on the same...
3
by: mphanke | last post by:
Hi there, I have a customer who has an Exchange Server running on an ISA Server. And there my problem begins... I have to pickup eMails through my software from that server - the problem: I...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
8
by: Frank | last post by:
I think I've confused myself completely here :-) I have used System.Web.Mail, but am not sure if this works with Exchange Server 5.5. I asked the client if they're email server supported SMTP, and...
4
by: Norton | last post by:
Hi all, I would like to retrieve mail from a mail server (Exchange Server 5.5), do some operations and then delete email. I have try using Outlook to retrieve mail items, it works but...
1
by: Jim H | last post by:
I want to write an outlook plug-in or even a separate app if necessary to connect to an exchange server to get mail off of it. My outlook is currently connected to Exchange server A, I need to get...
8
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked to was a Linux SMTP server and it worked great ...
3
by: Pav | last post by:
Hi, I am developing a small Intranet web application which needs to send mails to our coporate Ids. I am using CDONTS, But my mails never leave Que folder. Not able to find out what the...
2
abdoelmasry
by: abdoelmasry | last post by:
Hi men i have big problem with microsoft exchange server 2003 i installed exchange server as main mail server to use it on in company i have static real ip address im sending and...
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.