note 26140 added to ref.mail

From: Date: Sat, 19 Oct 2002 15:52:56 +0000
Subject: note 26140 added to ref.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-38294@lists.php.net to get a copy of this message
I've found this quite convenient in mail functions distributing various newsletters with HTML content: function mail_from_file($template) { $to = "you@you.com"; $title = "A message"; $header = ""; // Found elsewhere $message = join('',file($template)); mail($to,$title,$message,$header); } /* PHP Code Body */ mail_from_file("newsletters/news2002-10-15.html"); This is just a short snippet from my code, and you'll probably want to make some string replacements in the retrieved message templates to personalize the emails for your recipients. -- http://www.php.net/manual/en/ref.mail.php http://master.php.net/manage/user-notes.php?action=edit+26140 http://master.php.net/manage/user-notes.php?action=delete+26140 http://master.php.net/manage/user-notes.php?action=reject+26140

« previous php.notes (#38294) next »