note 48044 added to function.popen
| From: | webmaster at elcurriculum dot com | Date: | Thu, 09 Dec 2004 20:05:09 +0000 |
| Subject: | note 48044 added to function.popen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-81609@lists.php.net to get a copy of this message | ||
This function send an email in html format.
function SendEmail($to,$asunto,$html,$from) {
$fd = popen("/usr/sbin/sendmail -t", "w");
fputs($fd, "Content-type: text/html\r\n");
fputs($fd, "To: $to\r\n");
fputs($fd, "From: TRYKE <" . $from . ">\r\n");
fputs($fd, "Subject: $asunto\r\n");
fputs($fd, "X-Mailer: PHP3\r\n\r\n");
fputs($fd, $html);
pclose($fd);
}
Examples:
SendEmail("tryke@hot.com","My Subject","<h1>Hi,<br>How are
you?</h1>","miemail@midomain.com");
More:
http://tryke.blogcindario.com
----
Manual Page -- http://www.php.net/manual/en/function.popen.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48044
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48044&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48044&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48044&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48044&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48044&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48044&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48044&report=yes
Search -- http://master.php.net/manage/user-notes.php