Escolha uma Página
Joomla is dead, all we know it! But eventually you will need revisit some old site made in Joomla, so, if you are struggling about how to send an email in joomla here you will find the solution here!
# Invoke JMail Class

$mailer = JFactory::getMailer();

# Set sender array so that my name will show up neatly in your inbox

$mailer->setSender($data[‘mailfrom’]);

# Add a recipient — this can be a single address (string) or an array of addresses

$mailer->addRecipient($user->email);

$mailer->setSubject(utf8_decode($subject));

$mailer->setBody($body);

# If you would like to send as HTML, include this line; otherwise, leave it out

$mailer->isHTML();

# Send once you have set all of your options

$return = $mailer->send();