Hello everyone

Before meeting a demand, is the need to modify the contents of the letter joomla members, because the native contents of the letter too simple, or made a guest needs, and so on ....
 

So, how to modify the default mail ?
Let's look at how to generate members joomla3 contents of the letter,
for example: registered,  ... and more.

Basically it is to use PHP's sprintf() function, and with the "letters translated string"
For example file:

 
Joomla3_1\language\langCode\langCode.com_users.ini
 
there is:
 
COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY="Hello %s,\n\nThank you for registering at %s. Your account is created and must be activated before you can use it.\nTo activate the account select the following link or copy-paste it in your browser:\n%s \n\nAfter activation you may login to %s using the following username and password:\n\nUsername: %s\nPassword: %s"

That is content of the letter is to add translation files by sprintf()
So the "parameter" the first %s is "username"

What if I want to modify the contents of the letter is in HTML format
In fact, some want to edit
Must be preset PHPmailer (joomla3 all send a letter with PHPmailer)
The default setting is changed to html

 

$mail->isHTML(true);

Then how to set it?
There are two directions

 

1.add a new plug-in, to call members to send a letter before action
 
$mailer = JFactory::getMailer();
$mailer->isHTML(true);
JFactory::$mailer = $mailer;
2.Directly modify joomla file
libraries/joomla/factory.php
there have createMailer() change the default setting
 

Suppose we have solved the problem in html format
So how do we modify the template?
the point is
If you have double quotes, remember to change that to "_QQ_"
Thus for example:

 
COM_USERS_EMAIL_REGISTERED_WITH_ACTIVATION_BODY="<span style="_QQ_"color:red"_QQ_">Hello %s, </span><br>Thank you for registering at %s. Your account is created and must be activated before you can use it.<br>To activate the account select the following link or copy-paste it in your browser:<br>%s <br>After activation you may login to %s using the following username and password:<br>Username: %s<br>Password: %s"
Then be sure to remember to test

because translation is easy error occurs in use HTML format , if there is an error, the contents of the letter would be empty, empty letters will not be sent, to pay attention to this point.

Almost like this
For your reference Hello, Cheers.