Skip to main content
8 votes
Accepted

Don't show other recipients when sending multiple emails with JMail

As you can see on the API reference page, the sendMail() function has a $bcc parameter: sendMail(string $from, string $fromName, mixed $recipient, string $subject, string $body, boolean $mode = ...
Lodder's user avatar
  • 26.9k
4 votes

Don't show other recipients when sending multiple emails with JMail

There are 2 solutions you can try of the following. By avoiding the mailer instance : $mailerand using the following code - JFactory::getMailer() JFactory::getMailer()->sendMail($emailfrom, $...
Liz.'s user avatar
  • 1,385
3 votes
Accepted

Adding SMTP header to message sent with JMail

Ah, I've found it: AddCustomHeader(). Output looks OK like this: $body = "Some content"; $mail = JFactory::getMailer(); $mail->addRecipient("[email protected]"); $mail->setBody($body); $...
Wim de Ruijter's user avatar
3 votes
Accepted

Send mail on execute

To use JMailer it is pretty simple. The code below should work for you. Just change the appropriate email address and name sections to get it to work. $subject = "New User Signup"; $msg = "New user"...
Terry Carter's user avatar
  • 1,832
2 votes
Accepted

getMailer gives "Failed to start application" exception after updating to Joomla4, how do I fix it?

The "Failed to start application" exception is thrown by \Joomla\CMS\Factory::getApplication(), which is called by \Joomla\CMS\Mail\Mail::Send() The problem is because the appliocation ...
Matt Garrod's user avatar
1 vote
Accepted

Ubuntu Server 16.04 and Joomla Mail with Exchange

I found the resolution. It turns out my inherited exchange server was configured incorrectly. For those of you who may experience the same issue, here's what I did to fix it in exchange 2016. In ...
Mark Anthony's user avatar
1 vote
Accepted

sending mail from personnal component = ok with Joomla!3.4.5 but nok with Joomla!3.6.2

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); //...
Juillet's user avatar
  • 41
1 vote

Don't show other recipients when sending multiple emails with JMail

Joomla Mailer extends the PHPMailer, so you can add this line of code after the send() $mailer->clearAllRecipients();
Stergios Zg.'s user avatar

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