I send emails with mandrill via smtp. Since I updated to Typo3 version 11, some emails are not passed to mandrill. But it is very irregular. Sometimes an email is sent. If I then try to send the same email again, it won't go out. If I remove a URL from the email text, it will be sent. Whether the email is sent depends on its content.
In Typo3 version 10 I never had this problem. Is there some kind of anti-spam function in version 11 that checks the content of an email and prevents it from being sent if it looks too "spammy"?
If so, can I disable it and is there a log where I can see if an email is prevented from being sent?
These are normal DSGVO-compliant transactional emails. Made something nice with HTML, but nothing promotional. And as I said, with Typo3 10 I never had this problem.
I am thankful for every hint.
I searched the internet for similar problems and checked the documentation to see if there were any new anti-spam functions, but I couldn't find anything. I have already ruled out general problems, since simple emails are always sent.
Many thanks and best regards Bernd
// edit: Here is my code to send the mail:
/**
* @param string $from
* @param string|array $recipients
* @param string $subject
* @param string $content
* @param string $fromName
* @param string $replyTo
* @param string $replytoName
*/
public function sendMailByMandrill($from, $recipients, $subject, $content, $fromName = '', $replyTo = '', $replyToName = '')
{
if (!is_array($recipients)) $recipients = [$recipients];
if (count($recipients) > 0) {
/** @var \TYPO3\CMS\Core\Mail\MailMessage $mail */
$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['format'] = 'both';
$mail->html($content);
$mail->from(new \Symfony\Component\Mime\Address($from, $fromName));
if ($replyTo) $mail->replyTo(new \Symfony\Component\Mime\Address($replyTo, $replyToName));
$mail->subject($subject);
foreach ($recipients AS $recipient) {
$mail->to($recipient);
$mail->send();
}
}
}