Problem With CDO in sending formatted text mail

K

k.visube

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.
 
A

Anthony Jones

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.
 
K

k.visube

Anthony said:
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?....
 
K

Kyle Peterson

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

k.visube

Kyle said:
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


news:[email protected]...

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([email protected]) 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
 

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,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top