I have been using the mailhost send API call to send email. I found that you cant use the character ':' (colon) in the body of the message or else the behaviour is wierd. ie email that it sends out has nothing in the subject and other fields and they are inserted in the body of the message. For eg: context.mailhost.send(messageText='test : doda\n', mto=<email>, mfrom='email', subject='test') sends in a email like this: test : doda To: aseem@neurobs.com From: webmaster@neurobs.com Date: Thu, 20 Mar 2003 15:09:59 -0800 Anybody else see this behavior?? Are there any other characters that can cause this knid of behavior and need to be filtered out?? Thanks AM -- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
AM wrote:
I have been using the mailhost send API call to send email.
I found that you cant use the character ':' (colon) in the body of the message or else the behaviour is wierd. ie email that it sends out has nothing in the subject and other fields and they are inserted in the body of the message.
For eg:
context.mailhost.send(messageText='test : doda\n', mto=<email>, mfrom='email', subject='test')
sends in a email like this:
test : doda To: aseem@neurobs.com From: webmaster@neurobs.com Date: Thu, 20 Mar 2003 15:09:59 -0800
Anybody else see this behavior?? Are there any other characters that can cause this knid of behavior and need to be filtered out??
Hi, I can reproduce this behavior, but I don't think that it is a bug. You've inserted an additional mail-header into your messageText, which can be useful if you want to customize your mail (think of something like: List-Id: ZopeNews). messageText is in this respect not the same as the mailBody... You can get rid of the problem, if you add an additional newline as seperator between headers and message-body. text.mailhost.send(messageText='\ntest : doda\n', mto=<email>, mfrom='email', subject='test') Cheers, Maik
From: "AM" <list_subscriber@neurobs.com>
I found that you cant use the character ':' (colon) in the body of the message or else the behaviour is wierd. ie email that it sends out has nothing in the subject and other fields and they are inserted in the body of the message.
You can't start it with "something:<space>anything", that is correctly, because that is how you write a header, so it will be assumed to be a header. If you remove the space, or the colon, or insert an extra blank line before the "test: "-part, it will work. So, it's not a bug it's a feature. :-)
participants (3)
-
AM -
Lennart Regebro -
Maik Jablonski