Problem With CDO in sending formatted text mail

Discussion in 'ASP General' started by k.visube@gmail.com, Jun 14, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. <> wrote in message
    news:...
    > 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.
    Anthony Jones, Jun 14, 2006
    #2
    1. Advertising

  3. Guest

    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, 2006
    #3
  4. 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


    <> wrote in message
    news:...
    > 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?....
    >
    Kyle Peterson, Jun 14, 2006
    #4
  5. Guest

    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
    >
    >
    > <> wrote in message
    > news:...


    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() 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, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron
    Replies:
    2
    Views:
    444
    Showjumper
    Jun 30, 2003
  2. Paul Turley

    Sending HTML formatted mail using CDONTS

    Paul Turley, Aug 12, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    334
    Parker Zhang [MSFT]
    Aug 12, 2003
  3. =?Utf-8?B?SWJyYWhpbS4=?=

    CDO Mail sending error

    =?Utf-8?B?SWJyYWhpbS4=?=, Jul 26, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    3,152
    sloan
    Jul 26, 2006
  4. Replies:
    0
    Views:
    1,332
  5. Kurien Baker Fenn

    Sending Mail using CDO

    Kurien Baker Fenn, Mar 2, 2005, in forum: ASP General
    Replies:
    4
    Views:
    159
    Bullschmidt
    Jul 21, 2005
Loading...

Share This Page