All that is needed is Outlook Express. I finally found a good reason to have OE installed by default.
Function SendEMail(sSender, sTo, sSubject, sTextBody, sFrom, sFile, sSMTPServer)
Dim objEmail
Set objEmail = CreateObject("CDO.Message")
objEmail.Sender = sSender
objEmail.To = sTo
objEmail.Subject = sSubject
objEmail.TextBody = sTextBody
objEmail.From = sFrom
objEmail.AddAttachment(sFile)
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sSMTPServer
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send
End Function
No comments:
Post a Comment