Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDONTS ASP script only works for external domains 1

Status
Not open for further replies.

dalchri

Programmer
Apr 19, 2002
608
US
I've got a CDONTS script that I'm trying to get to work on our web server. This script used to work on an external, outsourced web server. Now we host the website in house on a server that is on the same LAN as our exchange server.

This script allows us to collect contact information from a web page and email it to our receptionist. I can get the script to work if I send the email the an external domain such as username@externaldomain.com. However, whenever I change that script to send the email to our domain on our LAN (such as username@internaldomain.com) it just ends up in the mailroot/queue folder with an error message "Could not relay to host internaldomain.com".

What do I have to do to make IIS happy?

I've already created an external domain under the Default SMTP Virtual Server that has the "Allow incoming mail to be relayed to this domain" checkbox enabled. Also, under the default web site properties, server extensions tab, mail delivery options, I set the SMTP server address to 192.168.0.1, the ip of our exchange server.

Any ideas???
 
Post your CDONTS code so we can take a look at it. How is your mail delivered (eg: Exchange, POP3)?
 
Code:
<%
' SendMail variables
Dim CDO, body, strBcc, strCc, strAttach
Sub SendMail
'Create an instance of the collaboration object(only works on NT)
set CDO = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
body = strBodyText
If strBcc <> &quot;&quot; Then CDO.Bcc = strBcc End If
If strCc <> &quot;&quot; Then CDO.Cd = strCc End If
If strAttach <> &quot;&quot; Then
CDO.AttachFile(Server.MapPath(&quot;/data/resumes/&quot; & strAttach))
End If
CDO.Send strFromAddress, strToAddress, strSubject, body
Set CDO = Nothing
End Sub
%>
 
Our mail is delivered by exchange. Actually, I am not sure I know what is delivering these messages from the website though. The dialogs that I setup in IIS make no sense to me. I don't know if my ASP pages on the web server should be trying to use the default SMTP server running on the web server itself or going directly to the exchange server for mail delivery. Nor do I know what IIS is actually trying to do. I can only guess that the default SMTP server is trying to send the messages since the code does not explicitly say which server to use.
 
just a thought, get the relaying checked out on the Exchange server and your smtp server.

Digga

Sharing Knowledge Saves Valuable Time!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top