I mentioned a strange behavior on my webpage: If I try to use Joomla to send Mails via SMTP it works fine; no problem at all.
But: If I try to use a PHP-CLI-Script the action fails (same source code).
$mailer = JFactory::getMailer(); $config = JFactory::getConfig(); $sender = array( $from, $from ); $mailer->setSender($sender); $mailer->addRecipient($to); $mailer->isHTML(true); $mailer->Encoding = 'base64'; $mailer->setBody($content); $mailer->setSubject($title); $send = $mailer->Send();
If I do not use SMTP to send the mail but sendmail or php-mail, it works fine from PHP and PHP-CLI.
So my thought was, that there is possibly something in my php.ini for php-cli which blocks my cli-script from sending via SMTP.
Do you have an idea what to do?