I have been having problems with this script. It will send the forgot password information to email addresses on our domain, but not to email addresses outside our domain. The script is supposed to get information from the Database and then send it to the email address that it retrieves. We know it is retrieving the info, but not sending it to any outside domains.

Set ocmd = Server.CreateObject("ADODB.Command")
ocmd.ActiveConnection = Application("ConnectString")
ocmd.CommandText = "sp_cx_forgotpassword"
ocmd.CommandType = 4
ocmd.Parameters.Append ocmd.CreateParameter("RETURN_VALUE", 3, 4, 4)
ocmd.Parameters.Append ocmd.CreateParameter("@Name", 200, 1, 16, Request.Form("userid"))
ocmd.Prepared = True
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open ocmd
If ocmd.Parameters("Return_Value") = -1 then
Response.Redirect "ShowMessageOut.asp?Msg=Unfortunately your login name was not found in the system!"
end if
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "CX Community portal administrator"
Mailer.FromAddress = Application("FromAddress")
Mailer.RemoteHost = Application("SMTPHost")
Mailer.AddRecipient rs("FirstName")&" "&rs("LastName"), rs("EMail")
Mailer.Subject = "CX Community login information"
Mailer.BodyText = "Dear "&rs("FirstName")&","&VbCrLf&VbCrLf&"Below is your personal login information. Using this information you can log in to CX Community portal."&_
VbCrLf&VbCrLf&"Login Name: "&Request.Form("userid")&VbCrLf&VbCrLf&"Password: "&rs("Password")&_
VbCrLf&VbCrLf&"Thank you, "&VbCrLf&VbCrLf&"CX Community Portal Administrator"
'response.write rs("FirstName")&" "&rs("LastName")&", -"&rs("EMail")&"-
"
'response.write "sender: "&Mailer.FromAddress
'response.end
if Mailer.SendMail then
Response.Redirect "ShowMessageOut.asp?Msg=Your login information was successfully sent to your EMail!"
else
Response.Redirect "ShowMessageOut.asp?Msg=Mail send failure. Error: "&Mailer.Response
end if
%"

Can anyone see anything wrong with this script?