469,336 Members | 5,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

CDO authentication problem

Can someone explain why the following doesn't work?

<%
sch = "http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields

..Item(sch & "smtpserver") = "mail.midvalleyfurniture.com"
..item("http://schemas.microsoft.com/cdo/configuration/sendusing").value
=2
..item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").value
= 1
..item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value
="yadayadayada"
..item("http://schemas.microsoft.com/cdo/configuration/sendusername").value
="or****@myserver.com"

..update

End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "or****@myserver.com"
.To = "so******@somedomain.com"
.Subject = "Daily Report"
.TextBody = mailMessage

.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
If I take out the 3 authentication lines and send an email that's on
the same domain server (br***@myserver.com to ch***@myserver.com), it
goes through.
If outside the domain, I put the 3 lines back in and though I receive
no error message, the mail doesn't go through.

Thanks for any help,
Brett
Jul 19 '05 #1
2 4474

"Brett" <cl***************@yahoo.com> wrote in message
news:99**************************@posting.google.c om...
Can someone explain why the following doesn't work?

<%
sch = "http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields

.Item(sch & "smtpserver") = "mail.midvalleyfurniture.com"
.item("http://schemas.microsoft.com/cdo/configuration/sendusing").value
=2
..item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").val
ue = 1
.item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value
="yadayadayada"
.item("http://schemas.microsoft.com/cdo/configuration/sendusername").value
="or****@myserver.com"

.update

End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "or****@myserver.com"
.To = "so******@somedomain.com"
.Subject = "Daily Report"
.TextBody = mailMessage

.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
If I take out the 3 authentication lines and send an email that's on
the same domain server (br***@myserver.com to ch***@myserver.com), it
goes through.
If outside the domain, I put the 3 lines back in and though I receive
no error message, the mail doesn't go through.

Thanks for any help,
Brett


It could be a relaying permission problem. Check with the mail admin that
the IP of the server trying to initiate the mail session, as well as the
sendusername, aren't restricted from sending (relaying) mail to recipients
outside the mailserver's domain.

Alan
Jul 19 '05 #2
"J. Alan Rueckgauer" <vo**@dev.nul> wrote in message news:<ut**************@TK2MSFTNGP11.phx.gbl>...
"Brett" <cl***************@yahoo.com> wrote in message
news:99**************************@posting.google.c om...
Can someone explain why the following doesn't work?

<%
sch = "http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields

.Item(sch & "smtpserver") = "mail.midvalleyfurniture.com"
.item("http://schemas.microsoft.com/cdo/configuration/sendusing").value
=2

.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").val
ue
= 1
.item("http://schemas.microsoft.com/cdo/configuration/sendpassword").value
="yadayadayada"
.item("http://schemas.microsoft.com/cdo/configuration/sendusername").value
="or****@myserver.com"

.update

End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "or****@myserver.com"
.To = "so******@somedomain.com"
.Subject = "Daily Report"
.TextBody = mailMessage

.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
If I take out the 3 authentication lines and send an email that's on
the same domain server (br***@myserver.com to ch***@myserver.com), it
goes through.
If outside the domain, I put the 3 lines back in and though I receive
no error message, the mail doesn't go through.

Thanks for any help,
Brett


It could be a relaying permission problem. Check with the mail admin that
the IP of the server trying to initiate the mail session, as well as the
sendusername, aren't restricted from sending (relaying) mail to recipients
outside the mailserver's domain.

Alan


the webserver and the email server are the same machine/same ip.
sneding email thru the account from a client authenticates fine. the
asp code does not.

can MS's smtp server be set up to allow all relays or authenticate
relays per ip address?
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Michael Foord | last post: by
4 posts views Thread by Paul M | last post: by
5 posts views Thread by Gavin Stevens | last post: by
4 posts views Thread by Chris Gatto | last post: by
6 posts views Thread by Ming Zhang | last post: by
3 posts views Thread by KNC | last post: by
2 posts views Thread by Frank Swarbrick | last post: by
4 posts views Thread by =?Utf-8?B?R3V1czEyMw==?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.