Hello,
How can I add email address in Cc or Bcc with an email sent in Visual Basic (2008) using Redemption and Outlook (2003) ?
Here is my basic code :
Thanks
How can I add email address in Cc or Bcc with an email sent in Visual Basic (2008) using Redemption and Outlook (2003) ?
Here is my basic code :
Dim olApp As Outlook.Application
Dim olMail As Outlook.MailItem
Dim SafeMail As Redemption.SafeMailItem
olApp = CreateObject("Outlook.Application")
olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
SafeMail = CreateObject("Redemption.SafeMailItem")
SafeMail.Item = olMail
Dim strTo As String
Dim strCc As String
strTo = "(e-mail address removed)"
strCc = "(e-mail address removed)"
With SafeMail
.Recipients.Add(strTo)
.Recipients.ResolveAll()
.Subject = "This is a test"
.Body = "Email sent with VB"
.Send()
End With
SafeMail = Nothing
olMail = Nothing
olApp = Nothing
Dim olMail As Outlook.MailItem
Dim SafeMail As Redemption.SafeMailItem
olApp = CreateObject("Outlook.Application")
olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
SafeMail = CreateObject("Redemption.SafeMailItem")
SafeMail.Item = olMail
Dim strTo As String
Dim strCc As String
strTo = "(e-mail address removed)"
strCc = "(e-mail address removed)"
With SafeMail
.Recipients.Add(strTo)
.Recipients.ResolveAll()
.Subject = "This is a test"
.Body = "Email sent with VB"
.Send()
End With
SafeMail = Nothing
olMail = Nothing
olApp = Nothing
Thanks