Here is an example sending an email using the Redemption .dll fro
Access.
Code
-------------------
Private Sub SendSafeMail()
Dim safemail As Variant
Dim myOlApp
Dim MyItem
Dim myRecipient
Dim myBody
Dim myfolder
Dim mynamespace
Dim myAttachments
Dim Utils
Dim strSendTo As String
Dim strCC As String
Dim strAttachPath As String
Dim strAttachPath2 As String
strSendTo = "(e-mail address removed)"
'strCC = "(e-mail address removed)"
strAttachPath = "FullPathToFile"
'strAttachPath2 = "FullPathToFile"
Set myOlApp = CreateObject("Outlook.Application")
Set MyItem = myOlApp.CreateItem(0)
Set safemail = CreateObject("Redemption.SafeMailItem")
Set safemail.Item = MyItem
Set mynamespace = myOlApp.GetNameSpace("MAPI")
'mynamespace.Logon "myProfile", "myPassword", True, True ' Choose a Profile
Set myfolder = mynamespace.GetDefaultFolder(5)
With safemail
.recipients.Add (strSendTo) ' Send To
'.CC = strCC ' Carbon Copy
.Attachments.Add (strAttachPath) ' Attachment 1
'.Attachments.Add (strAttachPath2) ' Attachment 2
.Subject = "Text For Subject" ' Email Subject Text here
.Body = "Text Fo Email Body" ' Text for Email Body
'.Importance = olImportanceHigh ' High importance
.ReadReceiptRequested = True
.OriginatorDeliveryReportRequested = True
.Send
End With
Set Utils = CreateObject("Redemption.MAPIUtils")
Utils.DeliverNow
Set myOlApp = Nothing
Set safemail = Nothing
Set Utils = Nothing
MsgBox "Mail Sent", vbInformation, "Mail Sent..."
End Su