I have set DB automatisms to Table in the builder's config tab.
Then, I use the native joomla mail function in the administrator/components/name_of_my_component/tables/name_of_table.php
At the end of this file, here's my code
// Init mail send
$mail =& JFactory::getMailer();
$config =& JFactory::getConfig();
$mail->isHTML(true);
$mail->addRecipient('mail@mail.com');
$body = "Here is my text";
$mailSubject = "This is my subject"
$mail->setBody($body);
$mail->setSubject($mailSubject);
$mail->Encoding = 'base64';
if ($mail->Send()) {
echo "Mail sent successfully.";
$app = JFactory::getApplication();
$app->enqueueMessage('Mail sent');
} else {
echo "An error occurred. Mail was not sent.";
}