damthilaka Posted November 20, 2010 Share Posted November 20, 2010 <? // 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'); ?> [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/219276-how-to-use-stmp-authentication-for-this-please-help/ Share on other sites More sharing options...
Pikachu2000 Posted November 20, 2010 Share Posted November 20, 2010 PHP's mail() function makes no provision for SMTP authentication. You'll need to use a third party class like PHPMailer, or PEAR::Mail. Quote Link to comment https://forums.phpfreaks.com/topic/219276-how-to-use-stmp-authentication-for-this-please-help/#findComment-1137144 Share on other sites More sharing options...
damthilaka Posted November 20, 2010 Author Share Posted November 20, 2010 Can any one help me to add a third party php mailer to this.... Quote Link to comment https://forums.phpfreaks.com/topic/219276-how-to-use-stmp-authentication-for-this-please-help/#findComment-1137155 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.