473,805 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't send email outside of the network

Hello,

I have Asp.net 2.0 app that needs to send an email. It works fine when the
app tries to send inside of the network, but I can’t send email outside.
Does anyone know how I can resolve the problem? My code is as follows:

Dim objMail As New System.Net.Mail .MailMessage

'populage info
objMail.From = New MailAddress(“ ad***@mail.com )
objMail.To.Add( “To****@yahoo .com”)
objMail.Subject = “test”
objMail.Body = “Test Mail”
objMail.IsBodyH tml = True

Dim smtp As New
SmtpClient(Conf iguration.WebCo nfigurationMana ger.AppSettings ("defaultServer "))
smtp.Send(objMa il)

Thank you very much for your advice.
Chieko

Mar 9 '07 #1
2 1897
Does the user account running your ASP.NET app has necessary permission to
the SMTP server?

By "outside of the network", do you mean the IIS server and the SMTP server
are not in the same local network? or do you mean a user's client browser
reaches your ASP.NET app from outside network?
"chieko" <ch****@discuss ions.microsoft. comwrote in message
news:BC******** *************** ***********@mic rosoft.com...
Hello,

I have Asp.net 2.0 app that needs to send an email. It works fine when
the
app tries to send inside of the network, but I can't send email outside.
Does anyone know how I can resolve the problem? My code is as follows:

Dim objMail As New System.Net.Mail .MailMessage

'populage info
objMail.From = New MailAddress("ad ***@mail.com")
objMail.To.Add( "To****@yahoo.c om")
objMail.Subject = "test"
objMail.Body = "Test Mail"
objMail.IsBodyH tml = True

Dim smtp As New
SmtpClient(Conf iguration.WebCo nfigurationMana ger.AppSettings ("defaultServer "))
smtp.Send(objMa il)

Thank you very much for your advice.
Chieko

Mar 9 '07 #2
Thanks for youre response. I think my app has the necessary permission to
the SMTP server.
My app can send an email if "To" address is the same as the domain name but
can't send if "To" address isn't the same as the domain name. Hope I answer
your questions.

Thanks
Chieko

"Norman Yuan" wrote:
Does the user account running your ASP.NET app has necessary permission to
the SMTP server?

By "outside of the network", do you mean the IIS server and the SMTP server
are not in the same local network? or do you mean a user's client browser
reaches your ASP.NET app from outside network?
"chieko" <ch****@discuss ions.microsoft. comwrote in message
news:BC******** *************** ***********@mic rosoft.com...
Hello,

I have Asp.net 2.0 app that needs to send an email. It works fine when
the
app tries to send inside of the network, but I can't send email outside.
Does anyone know how I can resolve the problem? My code is as follows:

Dim objMail As New System.Net.Mail .MailMessage

'populage info
objMail.From = New MailAddress("ad ***@mail.com")
objMail.To.Add( "To****@yahoo.c om")
objMail.Subject = "test"
objMail.Body = "Test Mail"
objMail.IsBodyH tml = True

Dim smtp As New
SmtpClient(Conf iguration.WebCo nfigurationMana ger.AppSettings ("defaultServer "))
smtp.Send(objMa il)

Thank you very much for your advice.
Chieko


Mar 9 '07 #3

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

Similar topics

6
9214
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 the recipient. I have been testing this with my own email address. There is no error reported and everything "appears" to have worked except for the fact the email does not reach the recipient. I had this problem with CDONTS and thought that...
1
2025
by: bcanavan | last post by:
I'm trying to link a remote client Access app (through the internet) to an mdb in a web folder on my web server. The idea is to give users readOnly access to the web folder mdb, which itself links to SQL Server 2000. Users are not permitted to connect directly to SQL Server because it's outside our dmz. I have succesfully created a WebDAV on our Win2003 Server web server and granted readOnly permission to the users, who are listed in...
5
1628
by: Michal | last post by:
Hi I need to connect to Exchange 5.5 from .Net Web Application and send email using user profile. I did it two years ago on ASP but now I have to migrate it to .Net. I can not find any solutions in msdn to resolve it. Any idea how I can do this ? Michal
6
3966
by: JIM.H. | last post by:
Hello, I am using SmtpMail.Send() and I get the following message The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for myMail@hotmail.com What does this mean? Thanks, Jim.
3
1672
by: Paul | last post by:
I cannot seem to get an answer to this problem. Hopefully somebody here can help. I am using .net 1.1 wit sp1 under windows xp pro. I can't access any web services on the internet from a windows application. If the web service is on my localhost I can access it. I can access an internet web service from a webapp but cannot access the same web service from a windows app. Using a simple win app provided with the google api and I get
5
27165
by: Jay | last post by:
error '80040211' /register.asp, line 71 I receive this error when i attempt to send an email. My code is as follows:
8
7288
by: shapper | last post by:
Hello, I am trying to send an email using Asp.Net 2.0. I am getting the following error: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: No such user here at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify,
16
3013
by: bgreer5050 | last post by:
I have a form with the following fields: UserEmail Subject Body When the form is submitted, the email is processed fine. When I try to add another field to the mm.body (mm.Body = Body.Text & Listbox1.SelectedItem.Text) the smtp.Send fails. Any ideas ?
4
1717
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi All, Our company is merging two production domains(from two different servers) onto one server. So during the migration we use an intranet testing server to hold all files from these two domain, when we do testing, we use host file to map intranet IPs to these two domains. It will not impact on production sites since it won't be seen externally. These two domains navigable each other, that means from domainA we have links to domainB,...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.