note 21785 added to function.mail

From: Date: Mon, 27 May 2002 01:03:23 +0000
Subject: note 21785 added to function.mail
Groups: php.notes 
Request: Send a blank email to php-notes+get-31057@lists.php.net to get a copy of this message
If you use the file() function in the same routine as the mail() function, it will send ALL your headers as part of the msg, NOT as headers! For example, this will not work ... $list = file("dir/file.txt"); # php doesn't like this mail("$list[0]","subject","Hey!"); If you want to do this, try putting the array in the code itself, instead of importing it. For example, this will work ... $list = Array("q@q.com","etc,"); # php likes this mail("$list[0]","subject","Hey!"); Hope this helps! -- http://www.php.net/manual/en/function.mail.php http://master.php.net/manage/user-notes.php?action=edit+21785 http://master.php.net/manage/user-notes.php?action=delete+21785 http://master.php.net/manage/user-notes.php?action=reject+21785

« previous php.notes (#31057) next »