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

Problem With CDO in sending formatted text mail

P: n/a
In my ASP application,i need to send a formatted text mail (i.e with
newline characters).
here in my application i used a function in javascript which construts
the mail body
sample snippet

strbody=strbody +"dear customer,\n";
strbody=strbody +"we are glad to see ur response\n";
strbody=strbody +"we will make the needful thing as early as
possible\n";
.................
......................

sendmail(strbody) \\ this is a function to send email that written in
vbscript
..............
............
then send mail function uses cdo to send mail.
inside th sendmail() function . i ve set the mail body as textbody

i.e
objCDO.To = strTo
objCDO.From = strFrom
objCDO.Subject = strSubject
objCDO.TextBody =strBody
objCDO.Send

The actual problem is it works fine and produces text line breaks in
yahoo , hotmail, gmail ids .but with some other ids ...i seems not
working properly..i doesnt respect the newline character and shows the
mailbody as a chunk of paragraph...

why this type of controdictory effect with cdo with some mail ids....
Give me an idea to get rid off this problem .. thanx in advance

visu.

Jun 14 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

<k.******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
In my ASP application,i need to send a formatted text mail (i.e with
newline characters).
here in my application i used a function in javascript which construts
the mail body
sample snippet

strbody=strbody +"dear customer,\n";
strbody=strbody +"we are glad to see ur response\n";
strbody=strbody +"we will make the needful thing as early as
possible\n";
................
.....................

sendmail(strbody) \\ this is a function to send email that written in
vbscript
.............
...........
then send mail function uses cdo to send mail.
inside th sendmail() function . i ve set the mail body as textbody

i.e
objCDO.To = strTo
objCDO.From = strFrom
objCDO.Subject = strSubject
objCDO.TextBody =strBody
objCDO.Send

The actual problem is it works fine and produces text line breaks in
yahoo , hotmail, gmail ids .but with some other ids ...i seems not
working properly..i doesnt respect the newline character and shows the
mailbody as a chunk of paragraph...

why this type of controdictory effect with cdo with some mail ids....
Give me an idea to get rid off this problem .. thanx in advance

visu.


Have you tried \r\n instead of just \n. I believe strictly speaking \r\n is
the standard in SMTP emails.

Jun 14 '06 #2

P: n/a
Anthony Jones wrote:

Have you tried \r\n instead of just \n. I believe strictly speaking \r\n is
the standard in SMTP emails.


thanks jones, the solution to above problem now in second position.
here now major problem is the send mail i send to some email ids not
reaches its destination , but for the mails to all free mailds like
yahoo,sify, hotmail, gmail,.....etc works fine and i could get my mail
at those mailbox.
i am unable to send mail to some specific ids.. while executing the
script there is no error message but the message not reaches its
destination.. i ve tried whole day by refreshing my mail box .
i am testing my application under windows 2003 iis 6 environment.is
there any specific SMTP server config is need?.. if so then how could i
able to send mail to free mail ids (yahoo, hotmail) alone?. not to some
specific ids.
can anyone help in this regard?....

Jun 14 '06 #3

P: n/a
then that is not an ASP related issue.. it is a mail server/ system admin
type of issue

once asp sends the email it has no control over what doesn't make it to the
sender, gets marked as spam, gets stopped by blacklist filters, etc etc
<k.******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
Anthony Jones wrote:

Have you tried \r\n instead of just \n. I believe strictly speaking \r\n
is
the standard in SMTP emails.


thanks jones, the solution to above problem now in second position.
here now major problem is the send mail i send to some email ids not
reaches its destination , but for the mails to all free mailds like
yahoo,sify, hotmail, gmail,.....etc works fine and i could get my mail
at those mailbox.
i am unable to send mail to some specific ids.. while executing the
script there is no error message but the message not reaches its
destination.. i ve tried whole day by refreshing my mail box .
i am testing my application under windows 2003 iis 6 environment.is
there any specific SMTP server config is need?.. if so then how could i
able to send mail to free mail ids (yahoo, hotmail) alone?. not to some
specific ids.
can anyone help in this regard?....

Jun 14 '06 #4

P: n/a
Kyle Peterson wrote:
then that is not an ASP related issue.. it is a mail server/ system admin
type of issue

once asp sends the email it has no control over what doesn't make it to the
sender, gets marked as spam, gets stopped by blacklist filters, etc etc
<k.******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...


Still the problem pursues.. once again formatting comes in to big
issue..
First i ll tell my server Config
Win 2003
IIS 6 +SMTP server installed

I am using two functions
one in javascript which constructs the mail body
and another one in vbscript for sending mail by using CDO.

in javascript function i m constructing the mail body
like as follows..

strBody=strBody+"Dear customer \n";
strBody=strBody+"We got ur queries and we are working on them\n";
strBody=strBody+"You will get the response as early as possible \n";
...............
................
in the vbscript function

function sendmail(strBody)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = Request.Form("subject")
objMessage.Sender = Request.Form("From")
objMessage.To = Request.Form("To")
objMessage.TextBody =strBody
objMessage.Send
end function

The problem is when i receive and read this mail at my official domain
ids(so******@vsnl.com) it looks not line breaked ..instead it looks
like chunk of paragraph.

But the surprising thing is the same mail sent to free mail ids is like
yahoo,hotmail, gmail are works fine.yes it looks line breaked.. why
this controversial effects is happening?...
whether my code is wrong or is there any problem with my smtp server
config (it s configed inside IIS itself. i could see a tree menu named
with smtp virtual server) . or the mail destination server problem.so
that it represent non line breaked mail. i couldnt predict cause for
this issue.

Give me idea to solve this problem. thanks in advance.thanks for
previous replys too

visu

Jun 16 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.