472,099 Members | 2,529 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,099 software developers and data experts.

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 4551

"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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.