I need help about PHP's mail function on ipage hosting this script worked good on other hosts, but when I used it on ipage the site doesn't send any mail at all. I searched on the web and found something like this.
Mail from ipage utilizing PHP. You have to established the “From: ” discipline while in the mail function as ‘From: /usr/sbin/sendmail’.”\r\n”. So in the scenario the variable $from will be $from = ‘From: /usr/sbin/sendmail’.”\r\n”
So if anyone can help me how to implement this on this code:
$installUrl = $set['installUrl'];
$siteName = $set['siteName'];
$siteEmail = $set['siteEmail'];
$subject = $subscribeEmailSubject;
$message = '<html><body>';
$message .= '<h3>'.$subject.'</h3>';
$message .= '<p>'.$subscribeEmail1.'<br>'.$installUrl.'subscribe.php?email='.$subscribeEmail.'&hash='.$hash.'</p>';
$message .= '<hr>';
$message .= '<p>'.$subscribeEmail2.' '.$siteName.'.</p>';
$message .= '<p>'.$subscribeEmail3.'<br>'.$siteName.'</p>';
$message .= '</body></html>';
$headers = "From: ".$siteName." <".$siteEmail.">\r\n";
$headers .= "Reply-To: ".$siteEmail."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
if (mail($subscribeEmail, $subject, $message, $headers)) {
$msgBox = alertBox($subscribeConfMsg, "<i class='fa fa-check-square'></i>", "success");
// Clear the Form of values
$_POST['subscribeEmail'] = '';
}
Thank you.