voidlabs / mosaico

Mosaico - Responsive Email Template Editor
https://mosaico.io
GNU General Public License v3.0
1.71k stars 504 forks source link

Sending a test of a Mosaico template to existing contact email address creates new contact as a duplicate #372

Closed rocxa closed 7 years ago

rocxa commented 7 years ago

Steps to recreate:

Send a test from the mosaico builder to an email you know is an email for an existing civicrm contact record.

Mosaico creates a new duplicate contact instead of using an existing contact.

The tokens then don't work as the new duplicate record only has the email address and none of the other fields filled out. Also the duplicate needs merging.

Solution: Check the database for the test email address and use the associated contact id rather than creating a duplicate. In the case that there is more than one contact record with the email address, use the lowest contact ID number (as that is most likely not the duplicate and the record that has been in existence the longest).

bago commented 7 years ago

You are in the wrong place. Mosaico doesn't deal with sending email or writing records to DB. You may want to refer to the CiviCRM mosaico integration extension developers.