Ciao raga,

ho questa funzioncina che invia i messaggi di una news letter

Codice PHP:
function admin_send_msg() {
 
// Sends the message to all subscribers on the list.
 
global $list_name$list_file$owner_email;
  
set_time_limit(0);
 
$subject stripslashes($GLOBALS[subject]);
 
$message stripslashes($GLOBALS[message]);
 
$subject str_replace("%%""\""$subject);
 
$message str_replace("%%""\""$message);

 
$headers "From: \"$list_name\" <$owner_email>\r\nReply-To: $owner_email\r\nX-Sender: $owner_email\r\nX-UnsubscribeURL: [url]http://[/url]$GLOBALS[HTTP_HOST]$GLOBALS[SCRIPT_NAME]\r\nX-Mailer: PHPMailList V$GLOBALS[version] [url]http://php.warpedweb.net/\r\nX-AntiSpam:[/url] PHPMailList did not send you this email, review below for sender info.\r\nX-AntiSpam: Sent by $GLOBALS[REMOTE_ADDR]\r\n";

 if (
$GLOBALS[SERVER_ADMIN]) $headers .= "X-AntiSpam: Server Administrator $GLOBALS[SERVER_ADMIN]\r\n"

 if (
$GLOBALS['use_sig'] == "on"$message .= $GLOBALS['sig'];

 
$sucess_count 0;
 
$fail_count 0;

 
$addresses = @file($list_file) or die("<center>[b]The list data file could not be opened.[/b]
Check the path and permissions.</center>"
);
 
$addresses[] = $owner_email;
 
set_time_limit(0);
 foreach (
$addresses as $email) {
  
$email trim($email);
  if (
mail($email$subject$message$headers)) $sucess_count++;
  else 
$fail_count++;
 }
 echo 
"<h3 align=\"center\">Your message was sucessfully sent to $sucess_count addresses.</h3><h4 align=\"center\">There was $fail_count unsucessfully sent.</h4>";

Volevo chiedere, come si modifica per l'invio di email in formato html?


grazie a tutti.


dies