Sending Mail with Attachment in SharePoint 2010
string smtpServer = SPAdministrationWebApplication .Local.OutboundMailServiceInstance.Server.Address; string smtpFrom = SPAdministrationWebApplication .Local.OutboundMailSenderAddress; string Email= "EmailID" MailMessage mailMessage = new MailMessage (smtpFrom, Email); mailMessage.Subject = txtSubject.Text; mailMessage.Body = txtBody.Text; ...