How to create email templates and newsletter templates?
The admin can add, edit, delete them.
Thanks
creating templates
Moderator: General Moderators
I'm not sure I understand the question.
You would create a template just like you would any other page. HTML/CSS. With place holders for the info that changes.
You would create a template just like you would any other page. HTML/CSS. With place holders for the info that changes.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
If I understand your question you could create an "admin" page that allows users to create email "templates" using an editor such as FCKEditor or TinyMCE. These editors will create the HTML for you which can then be stored in a database as email templates.
In order to include dynamic content, simply add it to the source code.
When you want to send an email you can call a template and set it as the $message in mail().
In order to include dynamic content, simply add it to the source code.
When you want to send an email you can call a template and set it as the $message in mail().
-
shivam0101
- Forum Contributor
- Posts: 197
- Joined: Sat Jun 09, 2007 12:09 am
aceconcepts, you are right. Thats what i want. Instead of users admin himself create it. Later on he will select one of it and use it.
You mean to say only the html will be sent in message?
Should i have to add tags like header, footer, body etc? What dynamic content should he be given to add... i am confused
You mean to say only the html will be sent in message?
Should i have to add tags like header, footer, body etc? What dynamic content should he be given to add... i am confused
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
What I mean by dynamic content is content that is not static/constant i.e. date, person's name you are sending the email to.
All the editor will do for you is format the content you enter with HTML tags
e.g. if you enter something like "Hello this is a test email" as plain text without any additional formatting such as bold the editor will format your entry so that it looks like this:
In order to add dynamic content simply edit the source code ("Source" is provided on editor toolbar sets) and insert the PHP $variables you want.
e.g. When you edit the source code to add your $variables it will look something like this:
The value of variable $name_of_person will be picked up from your PHP scripted used to send the mail.
Does this help?
All the editor will do for you is format the content you enter with HTML tags
e.g. if you enter something like "Hello this is a test email" as plain text without any additional formatting such as bold the editor will format your entry so that it looks like this:
Code: Select all
<p>Hello this is a test email</p>e.g. When you edit the source code to add your $variables it will look something like this:
Code: Select all
<p>Hello <? echo $name_of_person; ?> this is a test email</p>Does this help?