Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > problem sending mail from ASP server

Reply
Thread Tools

problem sending mail from ASP server

 
 
bgs
Guest
Posts: n/a
 
      09-13-2007
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="(E-Mail Removed)"
objCDOMail.To="(E-Mail Removed)"
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="(E-Mail Removed)"
objCDOMail.To="(E-Mail Removed)"
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

 
Reply With Quote
 
 
 
 
ThatsIT.net.au
Guest
Posts: n/a
 
      09-13-2007
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/ws...eryreceipt.asp



"bgs" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.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="(E-Mail Removed)"
> objCDOMail.To="(E-Mail Removed)"
> 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="(E-Mail Removed)"
> objCDOMail.To="(E-Mail Removed)"
> 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
>


 
Reply With Quote
 
 
 
 
bgs
Guest
Posts: n/a
 
      09-13-2007
thanks
meanwhile i figured out it didn't work because most of the free-
hosting services simple don't offer SMTP support

 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      09-13-2007
"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.

 
Reply With Quote
 
bgs
Guest
Posts: n/a
 
      09-14-2007
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Failure Sending Mail" when using System.Net.Mail and ASP.Net 2.0 HoustonComputerGuy@gmail.com ASP .Net 4 09-28-2007 03:57 PM
problem sending mail: Sending the email to the following server failed Luke Java 2 03-15-2007 10:54 AM
pls help me when i sent mail, it vil sending twice instead of once ,am using java.mail,am sending my code.... shailajabtech@gmail.com Java 0 09-28-2006 06:38 AM
Sending Mail via System.Net.Mail problem =?Utf-8?B?T3Bh?= ASP .Net 3 01-31-2006 06:44 PM
Sending Mail Using ASP/VBScript to Exchange Mail Box martin smith ASP General 3 03-21-2005 06:45 PM



Advertisments