Dim sbmail As New StringBuilder Dim MailMsg As New MailMessage() MailMsg.To.Add(********) MailMsg.From = New MailAddress(job_email.Text) MailMsg.Subject = mail_sub.Text MailMsg.Body = mail_body.Text If fu_resume.HasFile Then MailMsg.Attachments.Add(New Attachment(fu_resume.PostedFile.InputStream, fu_resume.FileName)) End If MailMsg.IsBodyHtml = True Dim SmtpMail As New SmtpClient() SmtpMail.Host = "smtp.gmail.com" SmtpMail.Port = 587 SmtpMail.Credentials = New System.Net.NetworkCredential(****, ***) SmtpMail.EnableSsl = True SmtpMail.Send(MailMsg) ClearTextBox(Me) lblmsg.Text = "Resume Sent Successfully"
MailMsg.Attachments.Add(New Attachment(filePath))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)