Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2006

Tip: Looking for answers? Try searching our database.

Windows Service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed - 06 Oct 2006 20:06 GMT
I have written an windows sevice and successfully installed it. I am not sure
how to send email from windows service . I cannot do  
Dim varMessage As MailMessage = New MailMessage
Any help ?
Thanks

Signature

Thanks in advance

Bryan Phillips - 18 Oct 2006 01:27 GMT
This is an example from MSDN:

MailMessage message = new MailMessage(
      "from@contoso.com",
      "to@contoso.com",
      "Subject.",
      "Body.");

SmtpClient client = new SmtpClient("localhost");
// Add credentials if the SMTP server requires them.
client.Credentials = CredentialCache.DefaultNetworkCredentials;
client.Send(message);

Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com

> I have written an windows sevice and successfully installed it. I am not sure
> how to send email from windows service . I cannot do
[quoted text clipped - 4 lines]
> --
> Thanks in advance

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.