HTML format emails?

This mod, will add the ability to make "newsletters" and other customised mass emails, status is showen while sending mass email
It will also be posible to grant other users permissions to send mass email to a specific usergroup
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

HTML format emails?

Postby drift on Sat 16. Nov, 2002 17:32

is it possible to create HTML formatted emails as part of the template I wish to use the mod as a newsletter and with so many people using html enabled email readers these days I would like to offer it as a feature

is this possible?

thanks for your time
drift
Poster
Poster
 
Posts: 4
Joined: Sat 16. Nov, 2002 17:26

Postby Niels on Sat 16. Nov, 2002 23:52

what does this require ?
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby GoleyC on Sun 17. Nov, 2002 01:18

All it would require is two email templates. One that has all the html tags embedded in it, along with the {MESSAGE} pull tag. Then a second email template that is the usual template layout.

Therefore, create the html template the way you want the page to look. Then insert the tag, what ever it might be called, to pull in the message created by the other email template.

The additional step here would be that the first template would be created then imported into the second template that uses html.

Another note, with this setup, you could have a check-box when creating the message if you want it sent out either with html or plain text. Also, if you want to get really creative, you can have it setup so that the users themselves can select which format they prefer.

So you would have something like this.
First Template - plain text:
Code: Select all
Subject: Newsletter
Charset: iso-8859-1

Hello "{USERNAME}";

Your message here.

{EMAIL_SIG}

Then a second template - html formatted:
Code: Select all
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Your HTML Message Template Name</title>
</head>

<body>

{MESSAGE}


</body>
</html>


Does this make sense?
GoleyC
Poster
Poster
 
Posts: 117
Joined: Sun 13. Oct, 2002 21:42

Postby drift on Sun 17. Nov, 2002 02:09

GoleyC: thats what I want to do however as it stands this isn't possible as the text is sent as plain text, not html so by inserting the tags all you get out the tags back
drift
Poster
Poster
 
Posts: 4
Joined: Sat 16. Nov, 2002 17:26

Postby GoleyC on Sun 17. Nov, 2002 02:38

My idea was only in theory..has the program would have to be altered to do as I have said.

For now...you only option is plain text.
GoleyC
Poster
Poster
 
Posts: 117
Joined: Sun 13. Oct, 2002 21:42

Postby drift on Mon 18. Nov, 2002 12:33

I know that the mod needs to be altered to do it? I was wondering how much work this would be:

http://www.phpbuilder.com/columns/kartic20000807.php3

is an article on using MIME the standard way to deliver html embedded emails in PHP.

the key is defining content type

Content-type: text/html \n\n;

most of the information on the subject is hopelessly out of date...

finally got some thing useful
http://www.php.net/manual/sv/printwn/ref.mail.php

using the mail function and adding suitable headers

Code: Select all
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
drift
Poster
Poster
 
Posts: 4
Joined: Sat 16. Nov, 2002 17:26

Postby drift on Mon 18. Nov, 2002 12:50

Ok to make the forum produce html based mass mail simply open up

admin_mass_mail.php

find
Code: Select all
$email_headers .= "From: ".$board_config['sitename']." <".$board_config['board_email'].">\r\n";


around line 158 and before add the following

Code: Select all
$email_headers .= "MIME-Version: 1.0\r\n";
$email_headers .= "Content-type: text/html; charset=iso-8859-1\r\n";


the result is that you can then use html tags in your code :)
drift
Poster
Poster
 
Posts: 4
Joined: Sat 16. Nov, 2002 17:26

Postby macman on Mon 02. Jun, 2003 04:52

so add it to admin_mass_email.php in /admin and not mass_email.php form the mod? but it will work with the mod?

has anyone got this to work?
macman
Poster
Poster
 
Posts: 12
Joined: Mon 02. Jun, 2003 03:56

Next

Return to Custom mass email [2.0.8/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron