problem sending mail from ASP server

Discussion in 'ASP General' started by bgs, Sep 13, 2007.

  1. bgs

    bgs Guest

    i'm trying to send mail from asp server in two ways,

    the first uses CDONTS.Newmail:
    <%
    Dim objCDOMail
    Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

    objCDOMail.BodyFormat = 1

    objCDOMail.Subject="test"
    objCDOMail.From=""
    objCDOMail.To=""
    objCDOMail.Body="this is a test."
    objCDOMail.Send
    set objCDOMail=nothing
    %>

    and the second uses CDO.Message:
    <%
    Dim objCDOMail
    Set objCDOMail = CreateObject("CDO.Message")

    objCDOMail.Subject="test"
    objCDOMail.From=""
    objCDOMail.To=""
    objCDOMail.TextBody="this is a test."
    objCDOMail.Send
    set objCDOMail=nothing
    %>

    i know CDONTS is no longer used, but i had to check it.
    when i upload and run these files from the server, nothing happens, no
    mail is being sent.
    now,
    is it a sytax problem?
    or perhaps free hosting servers simple don't allow sending mail?


    thanks in advance,
    bgs
     
    bgs, Sep 13, 2007
    #1
    1. Advertising

  2. I cant remember the ins and outs of cdonts I haven't used it for a long
    time.


    But it would probably be easier to use CDO instead.

    this example adds a read receipt, but you can take some lines lines out

    http://dev.thatsit.net.au/samples/wsh/thatsit/messaging/sendemailwithdelveryreceipt.asp



    "bgs" <> wrote in message
    news:...
    > i'm trying to send mail from asp server in two ways,
    >
    > the first uses CDONTS.Newmail:
    > <%
    > Dim objCDOMail
    > Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
    >
    > objCDOMail.BodyFormat = 1
    >
    > objCDOMail.Subject="test"
    > objCDOMail.From=""
    > objCDOMail.To=""
    > objCDOMail.Body="this is a test."
    > objCDOMail.Send
    > set objCDOMail=nothing
    > %>
    >
    > and the second uses CDO.Message:
    > <%
    > Dim objCDOMail
    > Set objCDOMail = CreateObject("CDO.Message")
    >
    > objCDOMail.Subject="test"
    > objCDOMail.From=""
    > objCDOMail.To=""
    > objCDOMail.TextBody="this is a test."
    > objCDOMail.Send
    > set objCDOMail=nothing
    > %>
    >
    > i know CDONTS is no longer used, but i had to check it.
    > when i upload and run these files from the server, nothing happens, no
    > mail is being sent.
    > now,
    > is it a sytax problem?
    > or perhaps free hosting servers simple don't allow sending mail?
    >
    >
    > thanks in advance,
    > bgs
    >
     
    ThatsIT.net.au, Sep 13, 2007
    #2
    1. Advertising

  3. bgs

    bgs Guest

    thanks
    meanwhile i figured out it didn't work because most of the free-
    hosting services simple don't offer SMTP support
     
    bgs, Sep 13, 2007
    #3
  4. "bgs" wrote:
    > ...i know CDONTS is no longer used, but i had to check it.
    > when i upload and run these files from the server, nothing
    > happens, no mail is being sent.
    > now,
    > is it a sytax problem?
    > or perhaps free hosting servers simple don't allow sending mail?


    Or perhaps the server is not running SMTP Services? Or using a non-standard
    configuration, which will require you to update objCDOMail.Configuration?

    Why don't you ask the hosting company?



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
     
    Dave Anderson, Sep 13, 2007
    #4
  5. bgs

    bgs Guest

    > Or perhaps the server is not running SMTP Services? Or using a non-standard
    > configuration, which will require you to update objCDOMail.Configuration?
    >
    > Why don't you ask the hosting company?
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per message. Use
    > of this email address implies consent to these terms.


    i now know it doesn't offer SMTP support,
    now trying to figure out how to use my ISP SMTP server
     
    bgs, Sep 14, 2007
    #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. Replies:
    4
    Views:
    55,505
  2. =?Utf-8?B?T3Bh?=

    Sending Mail via System.Net.Mail problem

    =?Utf-8?B?T3Bh?=, Jan 25, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    3,612
    sachya
    Jan 31, 2006
  3. Replies:
    0
    Views:
    1,389
  4. Luke
    Replies:
    2
    Views:
    4,738
    Nigel Wade
    Mar 15, 2007
  5. martin smith
    Replies:
    3
    Views:
    338
    Jeff Cochran
    Mar 21, 2005
Loading...

Share This Page