Joomla default email template

email_templates

One missing Joomla feature seams to be a template system for the default emails.

In this article we will modify Joomla to have an email template for all the default emails.

We will edit the core Joomla mailer class, so if your website already uses some other extension for sending emails this might be a bad idea.

Lets get started.

We would need to create a folder in the joomla root directory called “mailtpl”.

Create 2 files, one for the email header and one for the footer, called “default_head.html” and “default_footer.html”.

In the default header we save this html code:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=utf-8″>
<title></title>
</head>
<body style=”margin: 0px;padding: 0px;background-color: #F7F7F7;color:#555555;”>
<div style=”width:80%;margin: auto;”>
<div style=”margin-top: 20px; background-color: #0077BB;
text-align: left;
color: white; border-radius: 5px 5px 0px 0px;
padding: 10px;font-weight: bold;border-bottom: 1px solid #0067A2;”>
YOUR SITE NAME
</div>
<div style=” background-color: #FFFFFF; min-height: 100px;
border: 1px solid #EEEEEE;
padding: 10px;”>

And in the footer:

</div>
<div style=” background-color: #0077BB;
text-align: left;
color: white;
padding: 10px;font-weight: bold;border-top: 1px solid #0067A2; border-radius: 0px 0px 10px 10px;
margin-bottom: 20px;”>
YOUR SITE SLOGAN
</div>
</div>
</body>
</html>

Change the “YOUR SITE NAME” and “YOUR SITE SLOGAN” with the desired details.

Now all we need to do is edit the Joomlas default mailer.

READ MORE

Comments

comments