For debugging, I tried these lines:


$m = new JMail();
$m->sendMail('myAddressMail@xx.fr','test', 'myAddressMail@xx.fr','test', 'essai', true,'myAddressMail@xx.fr');

It works within Joomla 3.4.5 but not within Joomla 3.6.2 (same configuration = php mail - send Test Mail works).

I think that changes were made in librairies/joomla/mail/mail.php but which ones / how to use sendMail() ?

Thanks for help


So here is the code that works :

//preparation et envoi du mail

//provenance du mail
$sender = array('myEmailAddress','myName');

//destibnataires du mail
$m->addRecipient($to); //an array of emails

//sujet du message

//encodage du mail

//le corps du message
//$message = a string with html tag

//envoi du mail
$send = $m->Send();

Thanks Lodder and AndyGaskell for yours contributions


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.