Join Up!
96819 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousezmlm_hashmailparse functionsnext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | Finnish | German

mail

(PHP 3, PHP 4 )

mail -- Envía correo

Descripción

bool mail ( string para, string sobre, string mensaje [, string cabeceras_adicionales])

mail() envía automáticamente el mensaje especificado en mensage al destinatario especificado en para. Para especificar múltiples destinatarios se puede hacer incluyendo una coma entre las direcciones en para.

Ejemplo 1. Enviando correo.

mail("pepito@loquesea.es", "Sobre este tema", "Linea 1\nLinea 2\nLinea 3");

Si se añadiera una cadena como cuarto argumento, esta cadena sería enviada al final de la cabecera. Esto se usa normalmente para enviar cabeceras extra en los mensajes. Si se desea enviar varias cabeceras extra el mecanismo será el mismo separándolas una linea.

Ejemplo 2. Enviando correo con varias cabeceras.

mail("pepito@loquesea.es", "El tema", $message,
     "From: webmaster@$SERVER_NAME\nReply-To: webmaster@$SERVER_NAME\nX-Mailer: PHP/" . phpversion());

User Contributed Notes
mail
add a note about notes
There are no user contributed notes for this page.
previousezmlm_hashmailparse functionsnext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST