Custom mail send in joomla

We Are Professional

Custom mail send in joomla

# At first needed to define or get some basic mailing values
$subject = “Subject for dummy message”;
$body = “This the body part for demo purpose.”;
$to = “”;
$from = array(“”, “Al Mamun”);

# Then invoke JMail Class
$mailer = JFactory::getMailer();

# Now, set sender array so that my name will show up neatly in your inbox

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


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

# Send once you have set all of your options
That’s all there is to it for sending a simple email. If you would like to add carbon copy recipients, include the following before sending the email:

# Add a blind carbon copy, if you want

# You can check, is message send???
if ($mailer->Send()) {
echo “Mail sent successfully.”;
} else {
echo “An error occurred. Mail was not sent.”;


WebinBangla is a leading web solution provider and we work globally. Wel make sure our clients and customers avail maximum benefits by using our high quality services and complete packages.

  • Address: Pahartoli, Raozan, Chittagong.
  • Email:
  • Phone: +880 1738 914871

Working Hours

  • Monday - Friday - 9am to 5pm
  • Saturday - 9am to 2pm
  • Sunday - Closed