Problem when sending email in Visual Studio 2005 Professional Edition. Please help!

B

bienwell

Hi all,

I've tried this code in Visual Studio 2005 Professional Edition to send
email. It didn't cause any errors, but didn't make any actions. The
Imports System.Net.mail is the object in this program. FromEmail and
Servername are variables in this code.


Dim mm As New MailMessage()
mm.From = New MailAddress(FromEmail)

mm.To.Add(Email_Address)

mm.Subject = subject

mm.Body = Msg



Dim smtp As New SmtpClient(ServerName)

smtp.Send(mm)



Anything wrong in this code ? Please advise. Thank you very much.
 
B

bienwell

Hi,

This code worked fine. My problem was .NET framework 1.1 and 2.0 were
installed in the same server and it took version 1.1 as default. It has
nothing to do with authentication.

Thanks a lot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top