By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,493 Members | 3,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,493 IT Pros & Developers. It's quick & easy.

Failure Sending Mail exception with VS 2005

P: n/a
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(strFrom,strTo)
... set Mail properties
Dim Client as System.Net.Mail.SmtpClient = New
System.Net.Mail.SMTPClient("localhost")
Client.UseDefaultCredentials = True
Client.Send(Mail)

That last line triggers the exception.

What is the solution? Thank you.

Mar 20 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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*****************@tornado.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(strFrom,strTo)
... set Mail properties
Dim Client as System.Net.Mail.SmtpClient = New
System.Net.Mail.SMTPClient("localhost")
Client.UseDefaultCredentials = True
Client.Send(Mail)

That last line triggers the exception.

What is the solution? Thank you.

Mar 20 '06 #2

P: n/a
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**************@TK2MSFTNGP12.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*****************@tornado.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(strFrom,strTo)
... set Mail properties
Dim Client as System.Net.Mail.SmtpClient = New
System.Net.Mail.SMTPClient("localhost")
Client.UseDefaultCredentials = True
Client.Send(Mail)

That last line triggers the exception.

What is the solution? Thank you.


Mar 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.