16

Answer for Users: If you are getting this error because you are using some extension that sends emails, please visit the developer page, and first make sure you are using the latest version. If you are 100% sure that you are using the latest version, but still getting this error, you should contact the developer and ask them about this error. Sending them ...


3

I also got this error when the $replyTo variable was empty and had to use if ( !empty($replyTo) ) { $mailer->addReplyTo($replyTo, $replyToName); }


3

You need a valid smtp server account in order to be able to send emails through SMTP. Your configuration settings show: SMTP Host = localhost SMTP User = ''; // none, empty SMTP Password = ''; //none, empty Since I see localhost for the host, I assume you want to use the smtp server of our hosting account. In this case you need to ask your ...


2

I stumbled upon the same problem and here is what I tried and worked for me. $mailer = JFactory::getMailer(); $mailer->setSender($sender); $mailer->addRecipient($recipient); $mailer->isHtml($is_html); $mailer->CharSet = 'UTF-8'; $mailer->Encoding = 'base64'; $mailer->setSubject($subject); $mailer->setBody($body); $mailer->AltBody = $...


1

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.


1

Clearing the Joomla cache may solve your problem. See https://github.com/joomla/joomla-cms/issues/11098 for details.


1

I also noticed your password and username were empty in the configurations you posted: essentially, you do not actually have SMTP and as Michael's warning states, your previous host was actually just allowing you to send without any authorization and creating a security vulnerability. A host will have documentation on their SMTP requirements and settings. ...


1

Option 1: In order for you to use the SMTP option in Joomla! on your local installation, you will need an SMTP service installed on that PC listening to port 25 (or whatever port you assign). If you do not have an SMTP service running on your PC (which you likely do not), you can change: public $mailer = 'smtp'; To: public $mailer = 'mail'; This will ...


1

So here is the code that works : //preparation et envoi du mail $m=JFactory::getMailer(); //provenance du mail $sender = array('myEmailAddress','myName'); $m->setSender($sender); //destibnataires du mail $m->addRecipient($to); //an array of emails //sujet du message $m->setSubject($subject); //encodage du mail $m->isHTML(true); $m->...


Only top voted, non community-wiki answers of a minimum length are eligible