CDOsys asp mail script problems

Discussion in 'ASP General' started by mister-Ed, Sep 21, 2007.

  1. mister-Ed

    mister-Ed Guest

    Trying to use cdosys mail, but this is giving me an "no such object"
    error. the hosting company is not much help, but their list of
    components offered does include cdosys mail:

    <form method="post" action="cdosys-godaddy.asp"><p class="bodymd-
    wh">Your Name:
    <input type="text" name="uname" id="uname">
    <br>City:
    <input type="text" name="city" id="city">
    <br>State:
    <input type="text" name="state" id="state">
    <br>

    Your Email:
    <input type="text" name="EMail" id="Email">
    <br><br>
    <input type="submit" name="btnSubmit"
    class="inputSubmit" value="Submit">
    </form>

    cdosys-godaddy.asp:

    <%
    dim strEmail,struname,strcity,strstate
    strEMail = Request("email")
    struname = Request("uname")
    strcity = Request("city")
    strstate = Request("state")


    Dim objMail
    'Create the mail object
    Set objMail = Server.CreateObject("CDO.Message")

    'Set key properties
    objMail.From =
    objMail.To = strEMail
    objMail.Subject= "Insert here your subject text"
    objMail.TextBody = "Insert here your plain body text"

    'Send the email
    objMail.Send

    'Clean-up mail object
    Set objMail = Nothing
    %>

    ???
    Ed
    mister-Ed, Sep 21, 2007
    #1
    1. Advertising

  2. mister-Ed

    jp2code Guest

    Mr. Ed,

    One of the things you are missing is a Configuration Field Item:
    'Name or IP of Remote SMTP Server
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    = "relay-hosting.secureserver.net"

    Also, are you aware that you are sending emails to the person that is
    filling out the form and specifying that they are originating from the Las
    Vegas Unions site? I'm not sure if GoDaddy allows this. I know you can
    specify that the message is from whatever name is supplied on the form, but
    I think it has to go to one of the names in your GoDaddy mail accounts.

    If you would like a nice, built web page that already works with GoDaddy,
    I've got one!

    Shoot me an email using my form mailer at www.joeswelding.biz.

    (Yeah, the site is crappy, but the mailer works great!)

    "mister-Ed" wrote:
    > Trying to use cdosys mail, but this is giving me an "no such object"
    > error. the hosting company is not much help, but their list of
    > components offered does include cdosys mail:
    >
    > <form method="post" action="cdosys-godaddy.asp"><p class="bodymd-
    > wh">Your Name:
    > <input type="text" name="uname" id="uname">
    > <br>City:
    > <input type="text" name="city" id="city">
    > <br>State:
    > <input type="text" name="state" id="state">
    > <br>
    >
    > Your Email:
    > <input type="text" name="EMail" id="Email">
    > <br><br>
    > <input type="submit" name="btnSubmit"
    > class="inputSubmit" value="Submit">
    > </form>
    >
    > cdosys-godaddy.asp:
    >
    > <%
    > dim strEmail,struname,strcity,strstate
    > strEMail = Request("email")
    > struname = Request("uname")
    > strcity = Request("city")
    > strstate = Request("state")
    >
    >
    > Dim objMail
    > 'Create the mail object
    > Set objMail = Server.CreateObject("CDO.Message")
    >
    > 'Set key properties
    > objMail.From =
    > objMail.To = strEMail
    > objMail.Subject= "Insert here your subject text"
    > objMail.TextBody = "Insert here your plain body text"
    >
    > 'Send the email
    > objMail.Send
    >
    > 'Clean-up mail object
    > Set objMail = Nothing
    > %>
    >
    > ???
    > Ed
    >
    jp2code, Sep 21, 2007
    #2
    1. Advertising

  3. "mister-Ed" <> wrote in message
    news:...
    > Trying to use cdosys mail, but this is giving me an "no such object"
    > error. the hosting company is not much help, but their list of
    > components offered does include cdosys mail:
    >
    > <form method="post" action="cdosys-godaddy.asp"><p class="bodymd-
    > wh">Your Name:
    > <input type="text" name="uname" id="uname">
    > <br>City:
    > <input type="text" name="city" id="city">
    > <br>State:
    > <input type="text" name="state" id="state">
    > <br>
    >
    > Your Email:
    > <input type="text" name="EMail" id="Email">
    > <br><br>
    > <input type="submit" name="btnSubmit"
    > class="inputSubmit" value="Submit">
    > </form>
    >
    > cdosys-godaddy.asp:
    >
    > <%
    > dim strEmail,struname,strcity,strstate
    > strEMail = Request("email")
    > struname = Request("uname")
    > strcity = Request("city")
    > strstate = Request("state")
    >
    >
    > Dim objMail
    > 'Create the mail object
    > Set objMail = Server.CreateObject("CDO.Message")
    >
    > 'Set key properties
    > objMail.From =
    > objMail.To = strEMail
    > objMail.Subject= "Insert here your subject text"
    > objMail.TextBody = "Insert here your plain body text"
    >
    > 'Send the email
    > objMail.Send
    >
    > 'Clean-up mail object
    > Set objMail = Nothing
    > %>
    >


    I've never heard of a 'no such object' error. Is that what it really says?
    Can you post the error in full. Is it on the CreateObject line? Has your
    hosting company confirmed that the CDOSYS is supported? Are the mail
    options in the server extensions for your site configured?


    --
    Anthony Jones - MVP ASP/ASP.NET
    Anthony Jones, Sep 21, 2007
    #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. martin

    cdosys.dll and sending mail

    martin, Jul 15, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,076
    wolfgangiron
    Jan 4, 2012
  2. Steve Y.

    CDOSYS.dll System.Web.Mail

    Steve Y., Sep 3, 2003, in forum: ASP .Net Security
    Replies:
    8
    Views:
    193
  3. Steve

    using cdosys.asp for form mail

    Steve, Apr 26, 2007, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    336
    Steve
    Apr 26, 2007
  4. Serge Myrand

    Problem sending mail (CDOSYS)

    Serge Myrand, Aug 9, 2004, in forum: ASP General
    Replies:
    2
    Views:
    276
    Serge Myrand
    Aug 9, 2004
  5. Replies:
    4
    Views:
    268
Loading...

Share This Page