Sending Mail to an External Email Address

E

Elliot

The following code works when sending to an email address that resides
on our Exchange domain. However, when trying to send to an External
domain it does not work. The folling is the "doesn't work" code:

Dim oMsg As MailMessage = New MailMessage()

oMsg.From = "(e-mail address removed)"
oMsg.To = "(e-mail address removed)"
oMsg.Subject = "This does not work"
oMsg.Body = "Does anyone have a solution"

SmtpMail.SmtpServer = "ABC.EXCHANGE.COM"
SmtpMail.Send(oMsg)


I believe there might be someing on IIS that needs to be set. Any help
is appreciated.

Thank you,
Elliot Semmelman
 
I

IbrahimMalluf

Hello Elliot



I just tested some code from a VB App using the SMPT mail object and
successfully sent emails out on a server outside our local net.



So it works. In fact, the Email server I used is on the net. Across
firewalls etc.



Check to see if Port 25 is blocked somewhere in your tcp/ip path.



Maybe your firewall blocks port 25 ?






--
Ibrahim Malluf
http://www.malluf.com
==============================================
MCS Data Services Code Generator
http://64.78.34.175/mcsnet/DSCG/Announcement.aspx
==============================================
 
E

Elliot Semmelman

Thank you for your reply. I've checked with our network people and they say
that Port 25 is not blocked. I can send it externally from Microsoft Outlook
and also using VB6 code. Still scratching my head.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top