CDO sends duplicate emails

Discussion in 'Classic ASP' started by rrhandle, Sep 21, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Can anyone tell me why the code below sends 3 copies of the same email???


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <META NAME="Generator" CONTENT="TextPad 4.6">
    <META NAME="Author" CONTENT="?">
    <META NAME="Keywords" CONTENT="?">
    <META NAME="Description" CONTENT="?">
    </HEAD>
    <%


    set MyMail = createobject("cdo.message")
    set objConfig = createobject("cdo.configuration")

    ' Setting the SMTP Server
    Set Flds = objConfig.Fields
    Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
    Flds.update

    Set MyMail.Configuration = objConfig
    MyMail.To = "[email protected]"
    MyMail.From = "[email protected]"
    MyMail.Subject = "stxcvbrSubject"
    MyMail.TextBody = "strBoxcvbxcvbdy"
    MyMail.fields.update
    MyMail.Send

    set MyMail = nothing
    set objConfig = nothing


    %>





    </BODY>
    </HTML>
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    I tested the same code (sending to another email address), I didn't get any dups

    quote:Originally posted by rrhandle

    Can anyone tell me why the code below sends 3 copies of the same email???


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <META NAME="Generator" CONTENT="TextPad 4.6">
    <META NAME="Author" CONTENT="?">
    <META NAME="Keywords" CONTENT="?">
    <META NAME="Description" CONTENT="?">
    </HEAD>
    <%


    set MyMail = createobject("cdo.message")
    set objConfig = createobject("cdo.configuration")

    ' Setting the SMTP Server
    Set Flds = objConfig.Fields
    Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
    Flds.update

    Set MyMail.Configuration = objConfig
    MyMail.To = "[email protected]"
    MyMail.From = "[email protected]"
    MyMail.Subject = "stxcvbrSubject"
    MyMail.TextBody = "strBoxcvbxcvbdy"
    MyMail.fields.update
    MyMail.Send

    set MyMail = nothing
    set objConfig = nothing


    %>





    </BODY>
    </HTML>
    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page