...

View Full Version : Email is not being sent using CDO.Message



BarrMan
11-18-2007, 12:20 PM
Hi.
I'm using my localhost to send an email to myself for testing procedure only.
I've had trouble configuring the server but finally it worked fine without any errors but the email is still not being sent.

I've tried the spam box and I've tried other email addresses but still no luck.

This is my code:

<%@Language="VBScript"%>
<%Option Explicit%>
<%Response.Buffer = True%>
<%
Dim Email,Configure,sch
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set Email = Server.CreateObject("CDO.Message")
Set Configure = Server.CreateObject("CDO.Configuration")
With Configure.Fields
.Item(sch & "sendusing") = 1
.Item(sch & "smtpserver") = "http://127.0.0.1"
.Item(sch & "smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup"
.Item(sch & "smtpauthenticate") = 1
.Item(sch & "smtpserverport") = 2
.Update()
End With

Set Email.Configuration = Configure
With Email
.Subject = "Hey Imri"
.To = "emree3@gmail.com"
.From = "http://127.0.0.1"
.HTMLBody = "<html><head></head><body><table border=1><tr><td>Hello world</td></tr></table></body></html>"
.Send
End With
%>

Any help would be much appreciated.

Loic
11-18-2007, 11:58 PM
Have you read the W3 Schools ASP Tutorial on sending mail?

ASP Sending e-mail with CDOSYS (http://www.w3schools.com/asp/asp_send_email.asp)

I found it quite useful.

BarrMan
11-19-2007, 12:34 PM
Have you read the W3 Schools ASP Tutorial on sending mail?

ASP Sending e-mail with CDOSYS (http://www.w3schools.com/asp/asp_send_email.asp)

I found it quite useful.

I get no error. It just doesn't send the email.

shakir
11-20-2007, 09:44 AM
Why dont you try CDONTS mail it sgoog no problem all support is there. Most of the peoples are using it

Spudhead
11-20-2007, 11:57 AM
Why dont you try CDONTS mail it sgoog no problem all support is there. Most of the peoples are using it

Apart from the extra functionality offered by CDOSYS, there's also the fact that CDONTS was effectively discontinued in Windows 2000 and is unavailable in Windows Server 2003.

BarrMan - I've had all sorts of problems getting authenticated messages through with CDOSYS. Have you tried changing the sendusing and authentication methods? That's about all I can suggest... I seem to recall something about needing an IMAP server but I might be way out there :(

BarrMan
11-21-2007, 08:10 PM
Hey.
I don't really think it's a matter of permission because it doesn't display the message but does say it has been sent because I can see the message on IIS mail folder.

Thanks for the reply though.

Does anybody else know what the problem might be?

Thanks again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum