Recently I received warning from my hosting provider that a couple of suspicious e-mails were sent from one J! instance. Listing of recipients also contained some legitimate addresses of related J! users. How can I establish simple logging of e-mails being sent out? I just need 'To' address, Subject and maybe first 100 characters of message body.

Is there an extension for that or can this be easily achieved by adding some line into one of methods in libraries/joomla/mail/mail.php? I'm not experienced with J! internals

  • whether there is a central mailing method (or two) where logging can be placed and
  • which logging method to call.

1 Answer 1


You would need to Create a new Joomla! Plugin to override/intercept the mailer plugin. At present there isn't one, and I do believe there should be a Joomla! mailer component which allows you to see what/who/when/where mail was sent on a configurable basis of course!

Joomla! sends mail through JMail! so you would need to test if send() is true and if so, update you own database table with your desired data.

So, see: https://api.joomla.org/cms-3/classes/JMail.html

For the API of JMail

And https://gist.github.com/dongilbert/3237387

For overriding core Joomla! Classes.

You may also find: https://docs.joomla.org/J3.x:Creating_a_Plugin_for_Joomla

For creating plugins if you are not familiar with the internal structure.

Most components sending emails do contain a list of emails and if they were or were not sent, like Easyblog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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