Link to home
Start Free TrialLog in
Avatar of zarzar
zarzar

asked on

Web Server can't send mail to external e-mail.

I used asp script  'objMail = Server.CreateObject("CDO.Message")' to send mails.
It works when I send the mail to an internal e-mail account, but not external emails (eg.yahoo, hotmail) ? Any idea how to slove it. Below are the spec.

Web server running IIS6.0 without Exchange installed.
There is another server running Exchange.

How do i get the sendmail working when sending to external e-mail? What are the settings to be configured on my Web Server? IIS? Virtual SMTP?
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Avatar of jagoodie
jagoodie

Which server are you specifying in teh objMail settings? (local or exchange?
Regardless, you need to configure your SMTP server to allow relaying.  Let me know which SMTP server you are using and i can tell you how to configure it.
Avatar of zarzar

ASKER

I'm not using any cdo.dll to communicate with the Exchange server. Currently all the mails are relaying on the local Web Server's Virtual STMP.

This is my mail code:
----------------------------
Set objMail = Server.CreateObject("CDO.Message")
objMail.To = frmMailTo
objMail.From = frmMailFrom
objMail.Subject = frmSubject
objMail.HTMLBody = frmMessage
objMail.AddAttachment (Server.MapPath(frmPath))
objMail.Send
-----------------------------
So how do I configure it? And also the Web server is running under a Cisco PIX Firewall.

This is the rejected mail that is send back to objMail.From e-mail
-----------------------------
Your message did not reach some or all of the intended recipients.

      Subject: My Subject
      Sent:      23/Apr/2004 9:27 AM

The following recipient(s) could not be reached:

      me@yahoo.com on 23/Apr/2004 9:27 AM
            The e-mail system was unable to deliver the message, but did not report a specific reason.  Check the address and try again.  If it still fails, contact your system administrator.
            <mydomain.net #5.0.0>
-------------------------------
try to send me an email to jay@topdogwebsolutions.com and lets see if that goes through.
Hi,

you must check the permission for SMTP enabled in Web server running IIS6.0 or not, since it has lot of security restriction u need to check and enable the 25 port also, if its not opened..and check the other options also..then try..u will get...

best of luck..

R.K
Avatar of zarzar

ASKER

Nope jagoodie, can't get through.

-----------------
Your message did not reach some or all of the intended recipients.

      Subject: Send this file...
      Sent:      26/Apr/2004 7:57 PM

The following recipient(s) could not be reached:

      jay@topdogwebsolutions.com on 26/Apr/2004 7:57 PM
            The e-mail system was unable to deliver the message, but did not report a specific reason.  Check the address and try again.  If it still fails, contact your system administrator.
            <mydomain.net #5.0.0>
------------------
Avatar of zarzar

ASKER

can't seems to get it working still..... only thing that i haven't try is relaying... How do i set that, lets say my exchange server ip is 111.222.33.444

Any idea....

Can i just relay the mail to my exchange server with the current code, or do i need to write some dll to link/create new mail object stuff???

I recomend getting away from CDO, and moving towards and SMTP product... I have used http://www.aspemail.com/ for years.  Pretty easy to set up, and works great.
You will need to configure an SMTP server to relay FROM your web server (put your web server's IP address in the list of IP's that are allowed).

Let me know if this works/doesn't work for you..
HI,

I would suggest doing an NSLookup from your Exchange Server and get the MX
records for that domain and then do a Telnet to that Server and this should
give you the specific reason you cannot send to them.

203204 XFOR: How to Obtain Internet Mail Exchanger Records with the
http://support.microsoft.com/?id=203204

153119 XFOR: Telnet to Port 25 to Test SMTP Communication
http://support.microsoft.com/?id=153119

Hope this helps,

R.K
Avatar of zarzar

ASKER

rama_krishna580,
 
I tried to Telnet to Port 25 to Test SMTP Communication AND IT WORKED FINE! I can create mail with telnet and send it both to my internal e-mails and my external (yahoo, hotmail) account !!!!

Now how do i configured my Exchange or Web server to make it work, since Telnet comfirms that i CAN. I don't wanna to do any stuff on my DNS server, Web and Exchange is fine.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of jagoodie
jagoodie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zarzar

ASKER

aspemail works fine!!! Thanks. Still i don't get i why i can't relay my mail from my web server. Can do it with Telnet why not with ASP?
CDO is not a relay issue, it is an issue with how your exchange server is set up.  Relay is an SMTP issue - being that telnet to port 25 and ASPEmail work, you are indeed able to relay.  CDO does not use SMTP