Sending a newsletter

I am setting up a newsletter on a web site. There are unique links to different users included and it looks good on screen.
What is the best way to send this page? I am planning to use a Cron Job to send like 100 at a time. And then set a field in the table to ‘sent’.

But, what is the best way to get all the css and html with all links included to be sent? Is there a way to store the whole output as a string and then get that from the cron job?
Or is there anyway I can e-mail a web page output, so the Cron Job might run through a loop telling it to send whatever is in http://www.website.com/newsletter.php?user=123

What I have right now is probably not the best way. Since I have a lot of parts of the e-mail separated as strings.
So it looks more like this:


$mail1 = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">'

$mail2 = '<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />'

$mail = $mail1.$mail2.$mail3.$mail4;

So, it becomes a lot of bits and pieces put together at the end of the page. And then I send all of this put together as one string.

There must be a better way to make it work? Anyone?

Hmmm, I think I found out how simple it actually is. Just building a web page with the content built in the right way and then attach that link… sorry…

Sending out email like this from your own server can have issues. Have you considered using a service like MailChimp? It saves you all the worry of getting blocked by your ISP, and gives you all kinds of stats etc.