Does anyone know how to "override" these mail settings in Joomla?

I need to set host, port etc at PHP level:

$mailer->setHost = "localhost";
$mailer->setPort = 25;
$mailer->setSMTPAuth = true;
$mailer->setSMTPSecure = "";
$send = $mailer->Send();

I use the settings as a "backup" mailserver in case the main mailserver is down but when I print out the mailer object the settings for host, port etc are NOT changed by the code above. So my code above does not have any effect.

Can anyone help?


The properties that you're using do not exist (I don't know where you're getting them from). You will need to use the function useSmtp in the JMail class in order to set the host, the port, etc... See: libraries\joomla\mail\mail.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.