Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Problem when sending email in Visual Studio 2005 Professional Edition. Please help!

Reply
Thread Tools

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

 
 
bienwell
Guest
Posts: n/a
 
      10-17-2006

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.






 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      10-17-2006
"bienwell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> Anything wrong in this code?


There's nothing intrinsically wrong with the code, but there may not be
enough of it...

Does your mail server require authentication?
See here for further details: http://www.systemnetmail.com


 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      10-17-2006
Check my blog:
Even if you don't download/use the code provided, it helps you understand
the authentication models.



http://sholliday.spaces.live.com/blog/ 2/8/2006 ENTRY DATE




Smarter Email/Smtp setup with DotNet Configuration Sections (1.1 and 2.0)
"bienwell" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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.
>
>
>
>
>
>



 
Reply With Quote
 
bienwell
Guest
Posts: n/a
 
      10-18-2006
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.

"Mark Rae" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "bienwell" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> Anything wrong in this code?

>
> There's nothing intrinsically wrong with the code, but there may not be
> enough of it...
>
> Does your mail server require authentication?
> See here for further details: http://www.systemnetmail.com
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enabling browser back button for GridView Paging and Sorting in Ajax1.1 and 3.5 (using Visual Studio 2005/ Visual studio 2008) anil reddy ASP .Net 0 02-11-2009 04:22 PM
Is Visual Studio 2005 complict with Visual Studio 2003 rockdale ASP .Net 1 08-23-2006 07:20 PM
Should I write Visual studio 2005 or Visual studio 2003 MCSD =?Utf-8?B?VmlqYXk=?= Microsoft Certification 14 06-30-2006 09:05 AM
quickstarts with Visual Studio 2005 February CTP -- Professional Edition (English) ? jmd ASP .Net 1 04-17-2005 07:01 PM



Advertisments