How to use stmp authentication for this????
Posted: Fri Nov 19, 2010 7:51 pm
<?
// Include Required File Here
require_once 'global.php';
include(CLASS_PATH. "project.cls.php");
set_time_limit(0);
$projObj = new project($dbObj);
$arrProjs = $projObj->getAllProjects();
for($j=0;$j<count($arrProjs);$j++) {
$arrProjFeed = $projObj->getAllProjectFeeds($arrProjs[$j]['proj_id']);
$noFeeds = 0;
if( count($arrProjFeed) > 0 ){
for($i=0; $i<count($arrProjFeed); $i++){
$mailTo = $arrProjFeed[$i]['email'];
$subject = stripslashes($arrProjFeed[$i]['title']);
$message = stripslashes($arrProjFeed[$i]['text']);
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";
$headers .= "From: admin@rss.com \r\n";
mail($mailTo, $subject, $message, $headers);
$rst = $projObj->changeStatusToFeedSent($arrProjFeed[$i]['feeds_id']);
$noFeeds += 1;
}
}
}
if($noFeeds)
print('Mail has sent to Successfully');
?>
// Include Required File Here
require_once 'global.php';
include(CLASS_PATH. "project.cls.php");
set_time_limit(0);
$projObj = new project($dbObj);
$arrProjs = $projObj->getAllProjects();
for($j=0;$j<count($arrProjs);$j++) {
$arrProjFeed = $projObj->getAllProjectFeeds($arrProjs[$j]['proj_id']);
$noFeeds = 0;
if( count($arrProjFeed) > 0 ){
for($i=0; $i<count($arrProjFeed); $i++){
$mailTo = $arrProjFeed[$i]['email'];
$subject = stripslashes($arrProjFeed[$i]['title']);
$message = stripslashes($arrProjFeed[$i]['text']);
$headers = "MIME-Version: 1.0 \r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";
$headers .= "From: admin@rss.com \r\n";
mail($mailTo, $subject, $message, $headers);
$rst = $projObj->changeStatusToFeedSent($arrProjFeed[$i]['feeds_id']);
$noFeeds += 1;
}
}
}
if($noFeeds)
print('Mail has sent to Successfully');
?>