Forum OpenACS Development: New complex send

Collapse
6: New complex send (response to 1)
Posted by Malte Sussdorff on
The acs_mail_lite::complex_send procedure is now able to deal with a couple of new flags:

- to_party_ids, cc_party_ids, bcc_party_ids: These are lists of IDs to whom we will send the email.

- to_group_ids, cc_group_ids, bcc_group_ids: Same as above, just that the group_id will be resolved for the list of recipients.

- to_addr, cc_addr, bcc_addr. These are useful if you are sending an email to a contact which does not have a party_id. No user creation or anything is happening. Mail tracking knows how to deal with that in a different way (see below).

All the above flags can be used at the same time in a mix and match fashion (send an e-mail TO a group, the sysadmin in BCC and an additional contact in CC).

- file_ids. Send the files (does not matter if this is a revision or an item_id, internally we process the item_ids using the latest revision) in the e-mail as an attachment.

- files. List of file_title, mime_type, file_path (as in full path to the file) combination of files to be attached. This allows you to include files generated by third party software on your harddisk.

- folder_ids. List of folders who's content to send as attachments. This does not go through the folder recursively.

- single_email(_p). Flag that indicates that only one mail will be send (in contrast to one e-mail per recipient). So if set, the e-mail will be send out in one single e-mail (with the to, cc and bcc fields filled out in the "First_Names Last_Name <email>" fashion). If not set, each recipient gets an individual email, regardless whether they are TO, CC or BCC.

This is on HEAD as it requires TCLLLIB to be installed.

Collapse
7: Re: New complex send (response to 6)
Posted by Malte Sussdorff on
Out of curiosity: As the group_ids are party_ids as well, should complex_send have a -to_group_ids switches in the first place, or should we put the logic to detect if a party_id is a group or not into complex_send.

This would be more logical with regards to the datamodel (after all groups are parties), though it might be a little bit confusing. What do you guys think?