473,654 Members | 3,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Failure Sending Mail exception with VS 2005

HK
In VB.NET, I'm getting the exception "failure sending mail". I'm running VS
2005 on XP Home. This is a new install on a new PC. I've never had email
problems with VS 2003, and there I could modify the SMTP settings in IIS.
But with this install, there is no IIS (at least I can't find an IIS with
MMC browsing the snap-ins). I suspect that is part of the problem but I
don't know the solution and I have to be able to test sending email from my
developer machine.

Here's the code that causes the exception:

Dim Mail as System.Net.Mail .MailMessage = New
System.Net.Mail .MailMessages(s trFrom,strTo)
... set Mail properties
Dim Client as System.Net.Mail .SmtpClient = New
System.Net.Mail .SMTPClient("lo calhost")
Client.UseDefau ltCredentials = True
Client.Send(Mai l)

That last line triggers the exception.

What is the solution? Thank you.

Mar 20 '06 #1
2 10136
HK,

The problem is in XP home, that has no IIS server and therefore as well no
IIS mail server.

You can use however any SMTP server that allows this.

I hope this helps,

Cor

"HK" <re************ **@notreal.com> schreef in bericht
news:3p******** *********@torna do.socal.rr.com ...
In VB.NET, I'm getting the exception "failure sending mail". I'm running
VS
2005 on XP Home. This is a new install on a new PC. I've never had
email
problems with VS 2003, and there I could modify the SMTP settings in IIS.
But with this install, there is no IIS (at least I can't find an IIS with
MMC browsing the snap-ins). I suspect that is part of the problem but I
don't know the solution and I have to be able to test sending email from
my
developer machine.

Here's the code that causes the exception:

Dim Mail as System.Net.Mail .MailMessage = New
System.Net.Mail .MailMessages(s trFrom,strTo)
... set Mail properties
Dim Client as System.Net.Mail .SmtpClient = New
System.Net.Mail .SMTPClient("lo calhost")
Client.UseDefau ltCredentials = True
Client.Send(Mai l)

That last line triggers the exception.

What is the solution? Thank you.

Mar 20 '06 #2
HK
I don't understand. Actually, I understand but it doesn't make sense.
Much was said by Microsoft about how VS2005 would have an IIS subsitute that
handled web requests (for testing ASP.NET) on random ports for security
reasons. I heard many times that developers could now do all their testing
with XP Home and not need to buy XP Pro. Are you saying that their IIS
substitute can't handle sending an email from the machine by itself? That
sounds like a good guess, but are you sure? If so, that's a big downfall
because developers would not be able to test "the same" code before putting
it online on a real server. I really hope Microsoft didn't do this.
"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ey******** ******@TK2MSFTN GP12.phx.gbl...
HK,

The problem is in XP home, that has no IIS server and therefore as well no
IIS mail server.

You can use however any SMTP server that allows this.

I hope this helps,

Cor

"HK" <re************ **@notreal.com> schreef in bericht
news:3p******** *********@torna do.socal.rr.com ...
In VB.NET, I'm getting the exception "failure sending mail". I'm running VS
2005 on XP Home. This is a new install on a new PC. I've never had
email
problems with VS 2003, and there I could modify the SMTP settings in IIS. But with this install, there is no IIS (at least I can't find an IIS with MMC browsing the snap-ins). I suspect that is part of the problem but I don't know the solution and I have to be able to test sending email from
my
developer machine.

Here's the code that causes the exception:

Dim Mail as System.Net.Mail .MailMessage = New
System.Net.Mail .MailMessages(s trFrom,strTo)
... set Mail properties
Dim Client as System.Net.Mail .SmtpClient = New
System.Net.Mail .SMTPClient("lo calhost")
Client.UseDefau ltCredentials = True
Client.Send(Mai l)

That last line triggers the exception.

What is the solution? Thank you.


Mar 20 '06 #3

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

Similar topics

3
57630
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was unhandled by user code Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at System.Net.Mail.SmtpClient.Send(String from, String
3
2942
by: amitbhanage | last post by:
I try to send the mail using asp.net 2005 The code I am using is Try Dim strTo As String = "to@yahoo.com" Dim strFrom As String = "from@gmail.com" Dim strSubject As String = "Hi Chris" SmtpMail.Send(strFrom, strTo, strSubject, "Boby: Hi how r u") Response.Write("Email is send") Catch ex As Exception
1
1491
by: KUTTAN | last post by:
I am trying to send emailes ,but it leades to exeption the exeption message is "Failure sending mail." Try Dim message As New MailMessage()
2
6817
by: satnamsarai | last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail. Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.' Not sure how to fix this error. I am able to send messages sometimes both other times randomly following error appear EXCEPTION:
2
6085
by: Danny | last post by:
Hi all, Trying to send mail with System.Net.SmtpClient, using very simple code just for testing: SmtpClient smtp = new SmtpClient("mail.server.com", 25); smtp.Credentials = new System.Net.NetworkCredential("user", "password"); try {
2
2572
by: shil | last post by:
Hi all, I'm using System.Net.Mail (Framework 2.0) to send emails on scheduled basis. This works great on Windows 2000 server. Rently we have upgraded our servers to Windows 2003. Since then some of the emails are failing from being sent to people. Ratio is like 1 in 30 are being failing, I thought it is the mail size issue and I have unchecked the mail size limit on SMTP server. Still I couldn't figure out why few are not going out.
9
3453
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient oSMTP.Send(oMailMessage) (in this line I am getting the above err)
5
4683
by: Don Quijote de Nicaragua | last post by:
Hi, everyone I try to send a simple e-mail witch this Code, but always send me a error messages: "ERROR: Failure sending mail." Thansk You. Don Quijote de Nicaragua. Elder Soto. Dim correo As New System.Net.Mail.MailMessage() correo.From = New System.Net.Mail.MailAddress("MyAco...@turbonett.com.ni")
1
1658
by: jagdeep gupta | last post by:
10.2 How to send emails by using System.Net.Mail CODE-BEHIND: MailMessage message = new MailMessage(); message.From = new MailAddress("fromusername@DomainName"); message.To.Add(new MailAddress("tousername@DomainName")); message.CC.Add(new MailAddress("ccusername@DomainName")); message.Subject = "Subject"; message.Body = "Content"; SmtpClient client = new SmtpClient();
0
8815
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
8708
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
8489
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
8594
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
6161
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
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
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

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.