Cannot send mail from ASP using CDO

Discussion in 'ASP General' started by Rajani, Jun 14, 2006.

  1. Rajani

    Rajani Guest

    Hi friends,

    I am sending mail from ASP program. My server is win 2k, IIS 5. SMTP
    server is configured.

    I am generating a report(purchase order) and the same sending as an email to
    the supplier. upto last week it was sending well. Now its returning bounce
    mail.

    in the c:\inetpub\mailroot\badmail contains the file(.bdr). The contents of
    the file are

    "From: postmaster@rajani
    To:
    Date: Tue, 6 Jun 2006 11:22:33 +0800
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
    boundary="9B095B5ADSN=_01C680B8C044750C00000003rajani"
    Message-ID: <8wSA1XvpF00000003@rajani>
    Subject: Delivery Status Notification (Failure)

    This is a MIME-formatted message.
    Portions of this message may be unreadable without a MIME-capable mail
    program.

    --9B095B5ADSN=_01C680B8C044750C00000003rajani
    Content-Type: text/plain; charset=unicode-1-1-utf-7

    This is an automatically generated Delivery Status Notification.

    Delivery to the following recipients failed.



    "

    the same message is returniing to the FROM email.

    I have included CC, BCC options also. The mail is successfully sending to
    them but not to TO.

    My code is ...

    dim sndMail,cdoconfig,personalmessage
    set sndMail=server.CreateObject("CDO.Message")
    set cdoconfig=server.CreateObject("CDO.configuration")
    personalmessage=replace(request("txtmsg"),vbcrlf,"
    ")

    with sndMail

    ..Fields("urn:schemas:mailheader:disposition-notification-to")=receiptto
    .Fields("urn:schemas:mailheader:return-receipt-to") =receiptto
    .From =session("email")
    .To =receiptto
    .CC=""
    .BCC =session("email")
    .Subject="Carton PO ( " & job & " ) from Montex"
    .HTMLBody =personalmessage & "

    " & request("txtbody")
    .DSNOptions=14
    .Fields.update
    .Send
    end with

    If I send mail from outlook, it is sending successful.

    whats the problem.Can anyone help me?
    Rajani, Jun 14, 2006
    #1
    1. Advertising

  2. http://www.aspfaq.com/2254




    "Rajani" <> wrote in message
    news:...
    > Hi friends,
    >
    > I am sending mail from ASP program. My server is win 2k, IIS 5. SMTP
    > server is configured.
    >
    > I am generating a report(purchase order) and the same sending as an email
    > to
    > the supplier. upto last week it was sending well. Now its returning bounce
    > mail.
    >
    > in the c:\inetpub\mailroot\badmail contains the file(.bdr). The contents
    > of
    > the file are
    >
    > "From: postmaster@rajani
    > To:
    > Date: Tue, 6 Jun 2006 11:22:33 +0800
    > MIME-Version: 1.0
    > Content-Type: multipart/report; report-type=delivery-status;
    > boundary="9B095B5ADSN=_01C680B8C044750C00000003rajani"
    > Message-ID: <8wSA1XvpF00000003@rajani>
    > Subject: Delivery Status Notification (Failure)
    >
    > This is a MIME-formatted message.
    > Portions of this message may be unreadable without a MIME-capable mail
    > program.
    >
    > --9B095B5ADSN=_01C680B8C044750C00000003rajani
    > Content-Type: text/plain; charset=unicode-1-1-utf-7
    >
    > This is an automatically generated Delivery Status Notification.
    >
    > Delivery to the following recipients failed.
    >
    >
    >
    > "
    >
    > the same message is returniing to the FROM email.
    >
    > I have included CC, BCC options also. The mail is successfully sending to
    > them but not to TO.
    >
    > My code is ...
    >
    > dim sndMail,cdoconfig,personalmessage
    > set sndMail=server.CreateObject("CDO.Message")
    > set cdoconfig=server.CreateObject("CDO.configuration")
    > personalmessage=replace(request("txtmsg"),vbcrlf,"
    > ")
    >
    > with sndMail
    >
    > .Fields("urn:schemas:mailheader:disposition-notification-to")=receiptto
    > .Fields("urn:schemas:mailheader:return-receipt-to") =receiptto
    > .From =session("email")
    > .To =receiptto
    > .CC=""
    > .BCC =session("email")
    > .Subject="Carton PO ( " & job & " ) from Montex"
    > .HTMLBody =personalmessage & "
    >
    > " & request("txtbody")
    > .DSNOptions=14
    > .Fields.update
    > .Send
    > end with
    >
    > If I send mail from outlook, it is sending successful.
    >
    > whats the problem.Can anyone help me?
    Aaron Bertrand [SQL Server MVP], Jun 14, 2006
    #2
    1. Advertising

  3. http://www.powerasp.com/content/new/sending_email_cdosys.asp




    "Rajani" <> wrote in message
    news:...
    > Hi friends,
    >
    > I am sending mail from ASP program. My server is win 2k, IIS 5. SMTP
    > server is configured.
    >
    > I am generating a report(purchase order) and the same sending as an email
    > to
    > the supplier. upto last week it was sending well. Now its returning bounce
    > mail.
    >
    > in the c:\inetpub\mailroot\badmail contains the file(.bdr). The contents
    > of
    > the file are
    >
    > "From: postmaster@rajani
    > To:
    > Date: Tue, 6 Jun 2006 11:22:33 +0800
    > MIME-Version: 1.0
    > Content-Type: multipart/report; report-type=delivery-status;
    > boundary="9B095B5ADSN=_01C680B8C044750C00000003rajani"
    > Message-ID: <8wSA1XvpF00000003@rajani>
    > Subject: Delivery Status Notification (Failure)
    >
    > This is a MIME-formatted message.
    > Portions of this message may be unreadable without a MIME-capable mail
    > program.
    >
    > --9B095B5ADSN=_01C680B8C044750C00000003rajani
    > Content-Type: text/plain; charset=unicode-1-1-utf-7
    >
    > This is an automatically generated Delivery Status Notification.
    >
    > Delivery to the following recipients failed.
    >
    >
    >
    > "
    >
    > the same message is returniing to the FROM email.
    >
    > I have included CC, BCC options also. The mail is successfully sending to
    > them but not to TO.
    >
    > My code is ...
    >
    > dim sndMail,cdoconfig,personalmessage
    > set sndMail=server.CreateObject("CDO.Message")
    > set cdoconfig=server.CreateObject("CDO.configuration")
    > personalmessage=replace(request("txtmsg"),vbcrlf,"
    > ")
    >
    > with sndMail
    >
    > .Fields("urn:schemas:mailheader:disposition-notification-to")=receiptto
    > .Fields("urn:schemas:mailheader:return-receipt-to") =receiptto
    > .From =session("email")
    > .To =receiptto
    > .CC=""
    > .BCC =session("email")
    > .Subject="Carton PO ( " & job & " ) from Montex"
    > .HTMLBody =personalmessage & "
    >
    > " & request("txtbody")
    > .DSNOptions=14
    > .Fields.update
    > .Send
    > end with
    >
    > If I send mail from outlook, it is sending successful.
    >
    > whats the problem.Can anyone help me?
    Kyle Peterson, Jun 14, 2006
    #3
    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. DotNetGruven
    Replies:
    3
    Views:
    1,032
    Steven Cheng[MSFT]
    Apr 27, 2004
  2. Lance Safford
    Replies:
    0
    Views:
    372
    Lance Safford
    Apr 21, 2004
  3. Vijay

    Error in Send mail in ASP with CDO

    Vijay, Jul 4, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    622
    Alexey Smirnov
    Jul 4, 2007
  4. Mike

    asp send mail cdo error

    Mike, May 17, 2007, in forum: ASP General
    Replies:
    1
    Views:
    141
    Adrienne Boswell
    May 20, 2007
  5. SSG
    Replies:
    0
    Views:
    148
Loading...

Share This Page