473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sending Mail to an External Email Address

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 = "jo******@abc.com"
oMsg.To = "jo*******@yahoo.com"
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
Jul 21 '05 #1
2 1985
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
==============================================


"Elliot" <es********@afgweb.com> wrote in message
news:e5**************************@posting.google.c om...
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 = "jo******@abc.com"
oMsg.To = "jo*******@yahoo.com"
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

Jul 21 '05 #2
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.
"IbrahimMalluf" <Ib*****@malluf.com> wrote in message
news:ed**************@TK2MSFTNGP12.phx.gbl...
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
==============================================


"Elliot" <es********@afgweb.com> wrote in message
news:e5**************************@posting.google.c om...
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 = "jo******@abc.com"
oMsg.To = "jo*******@yahoo.com"
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


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Owen | last post by:
I am sending email using CDO but it only seems to work when the "To" address is within the same domain as mine. When I send to an outside domain (eg. yahoo.com) the mail simply does not reach...
12
by: Joe_Black | last post by:
Hi all, I have googled this and found some answers but none that give me exactly what I'm after, maybe someone here can help. I have an app that will be distributed to users for their laptop...
3
by: VB Programmer | last post by:
I have an ASPX page where I send out emails through my mail server mail.MyDomain.com. When I send emails to MyName@MyDomain.com it sends PERFECTLY. When I try sending an email to any other address...
6
by: Robert Pettersson | last post by:
Hi, I have built an webapp in C# that uses SMTPMail to send mail to users. When I installed it on the prodserver everything worked fine for me, but the users can not send mail. They get Access...
2
by: Elliot | last post by:
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"...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
6
by: Anuradha | last post by:
Dear All How can i send mails using vb.net Thanx all
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.