Using the JMailer class, it possible to easily send out a mail using the Joomla API. One of the options I don't know too much about is the encoding part:

$mailer = JFactory::getMailer();
$mailer->Encoding = 'base64';

What is the benefit of using this?


This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.

Base64-encoded data takes about 33% more space than the original data.


  $str = 'This is an encoded string';
  echo base64_encode($str);



Source: http://php.net/manual/en/function.base64-encode.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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