Does anyone know where about in the code it is possible to disable the feature of not sending the same marketing message twice to a contact?
An example of use case would be the RSS To Email plugin. If someone wants to setup a campaign based on this type of email they would want it to go out to the same contact multiple times, yes this could then be set as a transactional email, however what affect would this have on the sending reputation. From my understanding if Marketing Email is selected Mautic appends a header in the email stating it is a Bulk email and ISP should award points for this notification.
I hear you and went and tested it, so it will only show the first number of sents and not the total number of sents. It does however hinder automation in such that someone needs to login each time clone the email and then send off. Which after a while you will have your email list fill with these emails, now it would be great once we get folders in place as this would help with the mess.
Anyway I went and did a little digging around and if anyone wants to do this it can be commented out in the code. The file in question is: CampaignSubscriber.php which is found in /app/bundles/EmailBundle/EventListener
You would then need to go to line 309 and uncomment until 323. Here is the exact code to uncomment:
309 if ('marketing' == $type) {
310 // Determine if this lead has received the email before and if so, don't send it again
311 $stats = $this->emailModel->getStatRepository()->getSentCountForContacts($contactIds, $emailId);
312
313 foreach ($stats as $contactId => $sentCount) {
314 /** @var LeadEventLog $log */
315 $log = $event->findLogByContactId($contactId);
316 // Pass with a note to the UI because no use retrying
317 $event->passWithError(
318 $log,
319 $this->translator->trans('mautic.email.contact_already_received_marketing_email', ['%contact%' => $credentialArray[$log->getId()]['primaryIdentifier']])
320 );
321 unset($credentialArray[$log->getId()]);
322 }
323 }
Warning: Well there are a number as I am sure @joeyk could point out, but one is make sure to make a backup of this file before changing in case you break something, once this is done there is the chance of contacts getting multiple marketing messages.