×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to send one email to multiple recipients using Redemption

How to send one email to multiple recipients using Redemption

How to send one email to multiple recipients using Redemption

(OP)
Hello everyone. This is my first post. I would appreciate any help to resolve my problem.
I'm writing a procedure to send email from our VFP application using Redemption.
Here is the stripped code that is working for one recipient address / one CC address:

loOutLook = CREATEOBJECT("Outlook.Application")
loNamespace = loOutLook.GetNamespace("MAPI")
loNamespace.Logon

loSafeItem = CREATEOBJECT("Redemption.SafeMailItem")
loMAPIUtils = CREATEOBJECT("Redemption.MAPIUtils")

loItem = loOutLook.CreateItem(0)
loSafeItem.Item = loItem

loSafeItem.Recipients.Add(lcReceipientAddress)
loSafeItem.cc = lcCCAddress

loSafeItem.Recipients.ResolveAll()
loSafeItem.Send
loMAPIUtils.DeliverNow()

I wanted to send one email to multiple recipients:
When I assign 2 addresses to the variable lcReceipientAddress: lcReceipientAddress="one@abc.com;two@abc.com" with semicolon as separator it doesn't work. It sends email to CC address.

Thanks, smile

RE: How to send one email to multiple recipients using Redemption

(OP)
Thanks, I will look at this.

RE: How to send one email to multiple recipients using Redemption

Welcome to the forum, Jerzy.

With the Redemption object, you cannot use the Add method to add a semi-colon-delimited list of recipients. You have to add each one individually, with successive calls, then call ResolveAll() to resolve them.

Alternatively, you can set the To, CC an BCC properties to a delimited list of email addresses.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close