problem sending mail from ASP server

problem sending mail from ASP server

am 13.09.2007 10:09:15 von Bgs

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="joe@host.com"
objCDOMail.To="jim@host.com"
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="joe@host.com"
objCDOMail.To="jim@host.com"
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

Re: problem sending mail from ASP server

am 13.09.2007 13:48:40 von me

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/send emailwithdelveryreceipt.asp



"bgs" wrote in message
news:1189670955.277299.34310@50g2000hsm.googlegroups.com...
> 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="joe@host.com"
> objCDOMail.To="jim@host.com"
> 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="joe@host.com"
> objCDOMail.To="jim@host.com"
> 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
>

Re: problem sending mail from ASP server

am 13.09.2007 15:42:16 von Bgs

thanks
meanwhile i figured out it didn't work because most of the free-
hosting services simple don't offer SMTP support

Re: problem sending mail from ASP server

am 13.09.2007 15:47:22 von Dave Anderson

"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.

Re: problem sending mail from ASP server

am 14.09.2007 10:39:59 von Bgs

> 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