Page 1 of 1

PHP Email Processing

Posted: Mon Jul 03, 2006 4:26 am
by mikeeeeeeey
Please help!

I'm building a CMS at the minute based around a newsletter which can be sent by adding articles, images etc. to a database and then bringing them all together into an email.

However, I'm not quite sure how to put these articles into an email.

I've explored several ideas, but I'm getting to the point now where it's either gonna take 2 seconds or 2 years to do!

If anyone has any ideas, or even pseudo code, any help would be much appreciated.

Thank you

Posted: Mon Jul 03, 2006 5:46 am
by s.dot
something like this?

Code: Select all

$r = mysql_query("SELECT `fields`,`you`,`need` FROM `table`");
$a = mysql_fetch_assoc($r);

$body = $a['fields'].$a['you'].$a['need'];

mail('recipient@x.com','subject',$body,$headers);

Posted: Mon Jul 03, 2006 8:58 am
by mikeeeeeeey
yeah! thats a good call.
thanks a lot :)