email from windows service with attachment
I have one windows service in vb.net...Its functionality is to send email to faculty at given time...Now i want to send email to faculty along some attached documents to that email 开发者_开发知识库from windows service. That attached documents is the list of users from DB... So i want to know can we attached some documents to email send through windows service... If yes how..? Plz help thanx in advance
You can attach a document to an email using a System.Net.Mail.Attachment
object, along with the MailMessage
and SmtpClient
classes that I will have to assume that you are already using.
There is an example in the MSDN documentation, it is written in c#
but demonstrates how these classes are used.
http://msdn.microsoft.com/en-us/library/system.net.mail.attachment.aspx
精彩评论