CiviMail Mailing Accounts allow duplicate names, but breaks processing.
If two CiviMail Mailing Accounts have the same name, even if they have different roles, only the first will be used in either case.
The offending line of code is somewhere in the path of: CRM_Utils_Mail_EmailProcessor::_process -> CRM_Mailing_MailStore::getStore.
To replicate (Drupal, 4.7.27):
-
Create two mailing accounts. The first one should be "Email to Activity" and have no username / password settings The second should be "Bounce processing" and have username / password settings (order of creation is important, and give them both the same name)
-
Run the scheduled job "fetch bounces".
-
In watchdog, observe the error "could not connect" using the credentials of email to activity processor, even though it should use the Bounce Processing one.
-
Clear the watchdog logs.
-
Rename them to have different names, then retry
-
Check the watchdogs, and observe no error.