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
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