EnemyGateIsDown
Technical User
Hi Guys,
I want to send an SMTP email and include an attachment from my VB.NET application. When using ASP I was able to do this using a third party library as follows:
How can I achieve the same thing in VB.NET?
I want to send an SMTP email and include an attachment from my VB.NET application. When using ASP I was able to do this using a third party library as follows:
Code:
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = Session("Mailhost")
Mail.From = Session("FromAddress") ' From address
Mail.FromName = "Meeting Room Manager"
Mail.AddAddress emailTo, emailTo
emailSubject = sSubject
Mail.Subject = emailSubject
emailMessage = session("LotusNotesBodyMessage")
Mail.Body = emailMessage
If addressBookID <=0 or templateID = 4 then
Mail.AddAttachment session("AppDir") & "\" & ICS_ID &".ics"
End If
'Need to look up
Mail.SendToQueue(Application("sMailQueue"))
Mail.Reset
How can I achieve the same thing in VB.NET?