programming:php:sendmail-test-function
Sendmail - Тестовая функция
<? function sendmailer($to,$from,$subject,$msg){ $s="=?utf-8?b?".base64_encode($subject)."?="; $headers="MIME-Version: 1.0"."\r\n". "From: ".$from."\r\n". "Reply-To: ".$from."\r\n". "Return-Path: ".$from."\r\n". "X-Mailer: PHP/".phpversion()."\r\n". "Content-type: text/plain; charset=utf-8"; if($sendPass=mail($to,$s,$msg,'From: <intranet@morton.ru>\r\n','-f intranet@morton.ru')) return true; else return false; } $a = sendmailer("test@mail.mail",'test@test.test','subj','msg msg msg'); var_dump($a);
programming/php/sendmail-test-function.txt · Последнее изменение: 2017/03/27 11:26 — artur