Sending Mail to an External Email Address

  • Thread starter Thread starter Elliot
  • Start date Start date
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
 
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
==============================================
 
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.
 
Back
Top