Sending email from PHP

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
reverend_ink
Forum Contributor
Posts: 151
Joined: Sun Apr 20, 2003 1:18 am
Location: Las Vegas | London

Sending email from PHP

Post by reverend_ink »

Can anyone point me in the right direction for a php script for adminning and sending email to an opt-in mailing list(Not SPAM LIST)?

Thanks...
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you checked out what's available at hotscripts.com?

Mac
reverend_ink
Forum Contributor
Posts: 151
Joined: Sun Apr 20, 2003 1:18 am
Location: Las Vegas | London

Post by reverend_ink »

I ended up figuring out what I needed to do

Code: Select all

<?php
@mysql_connect($host, $loginname, $password) or die(mysql_error()); 
@mysql_select_db($data) or die('Could not select database'.mysql_error()); 


$result = mysql_query("SELECT email FROM $table ORDER BY email DESC");

echo "<form method=POST action=".$PHP_SELF.">";

while ($row = mysql_fetch_array($result)) &#123;

$row&#1111;"email"];

$bccText = $row&#1111;"email"];

mail($bccText,$subjectText,$msgText,$footer, "From: ".$fromText);

&#125;

?>
Post Reply