Attempting to send 'any' mail with php. I'm not sure what my settings and format should look like in my php.ini file. Currently my mail settings are:
[mail function]
; For Win32 only.
SMTP = smtp.mail.yahoo.com
; For Win32 only.
sendmail_from = crawfd@yahoo.com
; For Unix only. You may supply arguments as well (default: 'sendmail -t -i').
;sendmail_path =
The script I'm working with to send mail for a mailing list is below:
<?
$sql2 = "select email from mail";
$res2 = mysql_query($sql2) or die("Couldn't get addresses.");
$headers = "From: \"".FROMNAME."\" <".FROMEMAIL.">\n";
while ($row = mysql_fetch_array($res2)) {
$email_addr = $row[0];
if (INSERTLINK == "true") {
$fullmessage = $_POST[message] . "
-------------------------------------------------------
Unsubscribe Below
:: " . BASEHREF . "unsubscribe.php?email=" . $email_addr . "
-------------------------------------------------------";
} else {
$fullmessage = $_POST[message];
}
mail("$email_addr", "$_POST[subject]", $fullmessage, $headers);
}
echo "email sent!";
?>