PHP Email Processing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mikeeeeeeey
Forum Contributor
Posts: 130
Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK

PHP Email Processing

Post 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
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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);
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.
User avatar
mikeeeeeeey
Forum Contributor
Posts: 130
Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK

Post by mikeeeeeeey »

yeah! thats a good call.
thanks a lot :)
Post Reply