I've got a basic subscription list signup for a website, and a basic form to input the text for sending an email to the subscribers... but I need to know what steps I need to take to create an HTML email, place a different main topic in the newsletter each month, and still have it available to view from the site at a later time....

Can anyone help?

I'm not sure exactly how extensive your knowledge is of PHP or how much you've done so far. Since you say this is written in PHP (or you want it to be) I take it you are working on a *Nix platform? Do you have sendmail configured on the server? A database set up to keep track of subscriptions as well as prior newsletters?

You must give content type see the example below:

mail($to, $object, $message, "From: $from\nReply-To: $from\nContent-Type: text/html;);
8)

You must give content type see the example below:

mail($to, $object, $message, "From: $from\nReply-To: $from\nContent-Type: text/html;);
8)

Isn't there a " between the

text/html;

and the

);

?

I've got a basic subscription list signup for a website, and a basic form to input the text for sending an email to the subscribers... but I need to know what steps I need to take to create an HTML email, place a different main topic in the newsletter each month, and still have it available to view from the site at a later time....

Can anyone help?

I would suggest that you are use a PHP script already made to send your newsletter. Please also note that you have a very long email list, it is not a good idea to spend all the emails at the same time. You should include delays between sending x amount of emails.
This is because most hosting companies look out for accounts that sent a huge number of emails in a short period time. They identify such accounts as spammers and your account might get displayed.

You can find scripts that would handle that for you on hotscripts.com rather than spending a lot of time writting your own script and re-inventing the wheel.

I'm not sure exactly how extensive your knowledge is of PHP or how much you've done so far. Since you say this is written in PHP (or you want it to be) I take it you are working on a *Nix platform? Do you have sendmail configured on the server? A database set up to keep track of subscriptions as well as prior newsletters?

First, I am "jessa_lee" - though now married and I hadn't realized I had a username on DaniWeb when I created my new one :) My knowledge of PHP is limited, and the site is written with PHP. I already had the sendmail function set up on the site (4 years ago). What I wanted was for the client to be able to type up a newsletter and click submit, and for the PHP to do two things. 1) Send out the newsletter to all the subscribers (which it was already doing), and 2) store the fully typed newsletter in the MySQL DB for viewers to pull it up on the site. I also had the side of the site setup to view past newsletters... but the "create a newsletter archive" form was a seperate page from the "send a new newsletter" form and I didn't know what I needed to do to merge the two forms and have the script tell it to do both steps 1 and 2...

Does that make sense? I no longer run a web business, but I guess if there are others who would reference this posting for answers, I'd love any feedback (and to finally know for myself how to do it). Thank you for those of you who did post back when I requested - DaniWeb is AWESOME! ;)

use the headers like this for html mail

$headers = "MIME-Version: 1.0\r\n";
$headers .= 'From: test@mail.com' . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

You can use this code for sending HTML mail and this will return error message to from address if it have problem on diliver the mail.

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: <'.$from.'>' . "\r\n";
$return = '-f'.$from;

@mail($to, $subject, $msg, $headers, $return);

this url have more guide http://www.sugunan.com/forum/title/1/how-to-send-html-mail-with-php

This article has been dead for over six months. Start a new discussion instead.