2

I'm currently trying to enhance/streamline the User Registration process on our Joomla website, however I've run into a snag on modifying the User Confirmation email. I have figured out how to change the text (extensions -> language(s) -> overrides) of the email, but not the html of the email. I'm trying to use some basic styling and more strategic placement of the links to make it more abundantly obvious what to do.

Is there any way to do this without installing an extension? My site is getting pretty bloated and I would prefer to not install an extension or plugin.

Thanks!

1 Answer 1

2

The text is the HTML of the email. You can have HTML code in that text formatted the way you want. There is no other place where you can actually change the HTML of that email.

Update: Open the components/com_users/models/registration.php file and add true at the end of each and every JFactory::getMailer()->sendMail function call. For example, you should change the following line:

$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBody);

to

$return = JFactory::getMailer()->sendMail($data['mailfrom'], $data['fromname'], $row->email, $emailSubject, $emailBody, true);

Note that there are 4 occurrences, so you should change them all. Also note that this is a core modification, so proceed with caution.

If it still doesn't work, then change $emailBody (or $emailBodyAdmin) to html_entity_decode($emailBody) (or html_entity_decode($emailBodyAdmin)).

6
  • Thanks, you understood my question right on. The only problem is that I tried inputting HTML and it didn't work. For example, I tried to wrap text in an <a>: <a href="%s">Register</a>. And it showed up as literally <a href="{url here}">Register</a>. It doesn't appear to be working the way you said it should.
    – Brad Xanti
    Commented Jun 28, 2016 at 13:15
  • And by "Literally" i mean you could see the text "<a href..." in the email.
    – Brad Xanti
    Commented Jun 28, 2016 at 13:41
  • I have updated the answer - please check now.
    – itoctopus
    Commented Jun 28, 2016 at 14:23
  • 1
    First of all, thanks for the answer. It does work! However, won't these changes go away after the next Joomla version? Is there any way to make sure these changes persist?
    – Brad Xanti
    Commented Jun 28, 2016 at 18:12
  • 1
    Yes, by using a plugin. Sorry, but you either get 'bloated' sites or hacked together ones. You decide.
    – ApolloLV
    Commented Jul 28, 2016 at 20:31

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.