Hi,
I have a code that sends email using smtp server. There is an attachement file called test.pdf. the code is like this. This code is called from button Click event.
Try
sBody.AppendFormat("<b>test</b>")
'Assign mail attributes
mailCurrent.Subject = "testSubject"
mailCurrent.Body = sBody.ToString()
mailCurrent.To.Add(SendToEmail)
mailCurrent.Bcc.Add(ConfigurationManager.AppSettings("EmailBlindCopyMailbox"))
mailCurrent.From = New MailAddress(FromEmail)
mailCurrent.IsBodyHtml = True
mailCurrent.Headers.Add("Disposition-Notification-To", FromEmail)
mailCurrent.Headers.Add("Return-Receipt-To", FromEmail)
'Attach the pdf file
mailCurrent.Attachments.Add(New Sy ...
Go to the complete details ...