10

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. }
VOIR AUSSI

emailme, emailmefile, emailcrypto, emailhtml, sendmail

Commentaires

Votre commentaire :
[p] [b] [i] [u] [s] [quote] [pre] [br] [code] [url] [email] strip aide 2000

Entrez un maximum de 2000 caractères.
Améliorez la présentation de votre texte avec les balises de formatage suivantes :
[p]paragraphe[/p], [b]gras[/b], [i]italique[/i], [u]souligné[/u], [s]barré[/s], [quote]citation[/quote], [pre]tel quel[/pre], [br]à la ligne,
[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]commande[/code], [code=langage]code source en c, java, php, html, javascript, xml, css, sql, bash, dos, make, etc.[/code].