Solved

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

Posted on 2004-04-21
14
1,244 Views
Last Modified: 2010-04-20
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?
0
Comment
Question by:zarzar
  • 5
  • 5
  • 3
  • +1
14 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 10890790
0
 
LVL 2

Expert Comment

by:jagoodie
ID: 10893380
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.
0
 

Author Comment

by:zarzar
ID: 10895448
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>
-------------------------------
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Expert Comment

by:jagoodie
ID: 10900908
try to send me an email to jay@topdogwebsolutions.com and lets see if that goes through.
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10911439
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
0
 

Author Comment

by:zarzar
ID: 10917584
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>
------------------
0
 

Author Comment

by:zarzar
ID: 10917602
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???

0
 
LVL 2

Expert Comment

by:jagoodie
ID: 10918735
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..
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10923941
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
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10923951
0
 

Author Comment

by:zarzar
ID: 10926721
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.
0
 
LVL 2

Accepted Solution

by:
jagoodie earned 500 total points
ID: 10928130
really, try out aspemail. it is free, and good.
0
 

Author Comment

by:zarzar
ID: 10992798
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?
0
 
LVL 2

Expert Comment

by:jagoodie
ID: 10995246
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
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Migration from IIS6 onto IIS7 6 53
Website being blocked? 3 126
.htaccess rewrite url with querystring problem 13 94
whm high memory usage in processes 7 88
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question