By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

CDO doesn't send email

P: n/a
Hi,
I'm using CDO object to send email but it doesn't send any email and it does
not give an error.
My code look like this:

Dim iMsg2
Dim iConf2
Dim Flds2
Const cdoSendUsingPort = 2
set iMsg2 = CreateObject("CDO.Message")
set iConf2 = CreateObject("CDO.Configuration")
Set Flds2 = iConf.Fields
' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
With Flds2
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
'ToDo: Enter name or IP address of remote SMTP server.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"My_SMTP_Server"

..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
) = 10
.Update
End With
' Apply the settings to the message.
With iMsg2
Set .Configuration = iConf
.To = "<to@bla.com>" 'ToDo: Enter a valid email address.
.From = "fr**@bla.com" 'ToDo: Enter a valid email address.
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = "Test"
.Send
End With
' Clean up variables.
Set iMsg2 = Nothing
Set iConf2 = Nothing
Set Flds2 = Nothing

I have checked that a new file called "NTFS_f3a93f2401c34ab30000013f.EML" is
created in the folder "C:\Inetpub\mailroot\Queue\"

Also if I try to use CDO 1.x version I get an error.The code look like this:

Dim objNewMail

Set objNewMail = Server.CreateObject("CDONTS.NewMail")

objNewMail.From = "my****@myserver.com"
objNewMail.To = "my****@myserver.com"

objNewMail.Subject = "Test Subject"
objNewMail.Body = "Test Body"
objNewMail.Send

Set objNewMail = Nothing

Response.Write "Email has been sent"

I think the problem arises from SMTP Server.How can I understand that my
SMTP Server works fine?

Thanks,
Salim
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Have you looked in the event log to see if your server is unable to resolved
the recipient's domain?

Is the SMTP service running, or have you restarted it?

Ray at work

"Salim Afar" <sa****@luckyeye.com> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl...

I have checked that a new file called "NTFS_f3a93f2401c34ab30000013f.EML" is created in the folder "C:\Inetpub\mailroot\Queue\"

Jul 19 '05 #2

P: n/a
How can I understand SMTP service is running?
I looked at the Internet Information Services and the Default SMTP Virtual
Server is running.
And also I looked at Event Viewer and saw this error:
Message delivery to the remote domain 'opet.com.tr' failed for the following
reason: An internal DNS error caused a failure to find the remote server.
Thanks a lot,
Salim

"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl...
Have you looked in the event log to see if your server is unable to resolved the recipient's domain?

Is the SMTP service running, or have you restarted it?

Ray at work

"Salim Afar" <sa****@luckyeye.com> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl...

I have checked that a new file called
"NTFS_f3a93f2401c34ab30000013f.EML" is
created in the folder "C:\Inetpub\mailroot\Queue\"


Jul 19 '05 #3

P: n/a
You should talk to your DNS admin then. Try sending an e-mail to another
domain, like yo***************@hotmail.com or something and see if that
sends.

Ray at work

"Salim Afar" <sa****@luckyeye.com> wrote in message
news:uD*************@tk2msftngp13.phx.gbl...
How can I understand SMTP service is running?
I looked at the Internet Information Services and the Default SMTP Virtual
Server is running.
And also I looked at Event Viewer and saw this error:
Message delivery to the remote domain 'opet.com.tr' failed for the following reason: An internal DNS error caused a failure to find the remote server.
Thanks a lot,
Salim

"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl...
Have you looked in the event log to see if your server is unable to

resolved
the recipient's domain?

Is the SMTP service running, or have you restarted it?

Ray at work

"Salim Afar" <sa****@luckyeye.com> wrote in message
news:uY**************@TK2MSFTNGP11.phx.gbl...

I have checked that a new file called

"NTFS_f3a93f2401c34ab30000013f.EML"
is
created in the folder "C:\Inetpub\mailroot\Queue\"



Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.