The next issue is the inserts into acs_mail_log_recipient_map which are also choking.
I am fixing initially by doing party::get_by_email on each of the addresses that are passed in, but I suspect that this also needs to be done for the cc and bcc addresses.
I'll need to find a way to generate outgoing messages with lists of cc and bcc addressees as a test.
Any ideas?
R.