CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Bulk mailing multiple addresses from same contact
Pages: [1]

Author Topic: Bulk mailing multiple addresses from same contact  (Read 1206 times)

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Bulk mailing multiple addresses from same contact
March 10, 2010, 05:40:22 am
Hello to all,

Main question: Is it possible to send a mailing to more then one address for a single contact?
Some of our recipients would like to receive mailings to more than one e-mail address.

If the answer is no, then I might go ahead and try to make it work - the idea is that the bulk mail checkbox could be put on more then one e-mail. Is there a reason not to do that (any other parts of CiviCRM using this flag?)?

Best,
Goran

« Last Edit: March 10, 2010, 07:08:56 am by goran »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Bulk mailing multiple addresses from same contact
March 10, 2010, 06:47:47 am

Currently no, since the main temp tables created in CRM/Mailing/BAO/Mailing.php, function getRecipients use contact_id as the primary key. You'll need to restructure that function a fair amount. You might also want to check the constraints on the various mailing event tables and ensure that those will not be violated (i dont think so)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

goran

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
Re: Bulk mailing multiple addresses from same contact
March 10, 2010, 08:37:55 am
Ok, sound a bit more complicated then I anticipated.

I think I understand the main reasons (don't have time to look at the code in detail now), but there might be an easier way.
The fact is that multiple addresses are for the same contact, so it is still one id and structure might not need to change. Also since it is the same contact it should receive the same copy of the message (no need to parse it twice, it's a same name, salutation, etc..) and it is acceptable to use multiple addresses in the To: field.

Does that sound easier? (also I think log tables/activity would be better served like that)
So... if all of the above holds water and if you point me to general direction of where the actual To: address is fetched/resolved/composed I can give it a try (edit: I guess it is in CRM/Mailing/BAO/Mailing.php, I'll take a look)

Best,
Goran

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Bulk mailing multiple addresses from same contact
March 10, 2010, 10:12:35 am

You can potentially edit the function compose to add this feature in. You need to avoid making a DB call there since its in the inner part of the loop. We try to do most of the DB calls en-masse outside the loop (for efficiency reasons). But you can prototype the code in there and see if it meets your needs.

I do think this path is a more elegant and the right solution :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Sean Madsen

  • I post occasionally
  • **
  • Posts: 98
  • Karma: 5
  • CiviCRM implementer/developer
    • Bikes Not Bombs
  • CiviCRM version: 4.6
  • CMS version: Drupal 7
Re: Bulk mailing multiple addresses from same contact
August 19, 2010, 12:21:16 pm
I also would like to have this functionality.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Bulk mailing multiple addresses from same contact
August 19, 2010, 03:03:48 pm

if important to you/your org, please consider contributing a patch that does it and/or sponsoring the core team to add that feature in

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Bulk mailing multiple addresses from same contact

This forum was archived on 2017-11-26.