473,386 Members | 1,610 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,386 software developers and data experts.

Problem With CDO in sending formatted text mail

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
4 6070

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

Similar topics

14
by: Christophe Cerbourg | last post by:
hi, Bonjour, I'm using PHPMailer class to send mails and it works fine for HTML ones. But I can't manage to send correctly a text formatted mail... I tried this : - $message = "first...
1
by: Simon Wigzell | last post by:
I'm generating HTML formatted emails in my asp program using CDONT. Depending on hoow ling the link is it will sometimes wrap and ruin the link. The is Detail email properties listing : ...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
2
by: Paul Turley | last post by:
Does anyone have some sample code for sending an HTML formatted message using CDONTS? Thanks RE: Sending HTML formatted mail using CDONTS -- Paul Turley, MCSD, MCAD, MCT, MSF...
3
by: VB Programmer | last post by:
My company has it's own webserver, which is going to host our ASP.NET web application. We want the website to be able to send out emails. 1. What do I need on the server so that it has the...
1
by: robbiesmith79 | last post by:
Just so this is out there on the web, I battled the past 24 hours about this. Background info... I developed a ecommerce website in PHP 4 on a shared linux hosting plan from GoDaddy and had the...
4
by: cybervigilante | last post by:
I sent HTML formatted email, using PHP, to my Yahoo address from my server, and it came out fine, styles and all. I sent it to my gmail address to test it and all I see is the raw html code. But I...
8
by: wengkit | last post by:
i'm using System.Web.Mail in my application and i set the BodyFormat = MailFormat.Html; in MS C#.net MailMessage mailMsg = new MailMessage(); mailMsg.To = txtTo.Text; mailMsg.Cc =txtCc.Text;...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.