38

emailtext

emailtext
SYNOPSIS

emailtext($text, $to, $subject, $from=false)

DESCRIPTION
CODE
  1. require_once 'sendmail.php';
  1. function emailtext($text, $to, $subject, $from=false) {
  2.     global $signature, $mailer, $webmaster;
  3.  
  4.     if (!$from) {
  5.         $from = $webmaster;
  6.     }
  7.  
  8.     $headers = <<<_SEP_
  9. From: $from
  10. MIME-Version: 1.0
  11. Content-Type: text/plain; charset=UTF-8
  12. Content-Transfer-Encoding: 8bit
  13. X-Mailer: $mailer
  14. _SEP_;
  15.  
  16.     $body = <<<_SEP_
  17. $text
  18.  
  19. $signature
  20.  
  21. _SEP_;
  22.  
  23.     return sendmail($to, $subject, $body, $headers, $from);
  24. }
SEE ALSO

emailme, emailmefile, emailcrypto, emailhtml, sendmail

Comments

Your comment:
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip help 2000

Enter a maximum of 2000 characters.
Improve the presentation of your text with the following formatting tags:
[p]paragraph[/p], [b]bold[/b], [i]italics[/i], [u]underline[/u], [s]strike[/s], [quote]citation[/quote], [pre]as is[/pre], [br]line break,
[url]http://www.izend.org[/url], [url=http://www.izend.org]site[/url], [email]izend@izend.org[/email], [email=izend@izend.org]izend[/email],
[code]command[/code], [code=language]source code in c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].