RE: [PHP-ES] mandar mail con PHP
| From: | Guerrero, Jose | Date: | Thu, 30 May 2002 19:08:08 +0000 |
| Subject: | RE: [PHP-ES] mandar mail con PHP | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-23262@lists.php.net to get a copy of this message | ||
Hola, sabes, me sale este mensaje de error:
Warning: Failed to Connect in z:\htdocs\sistema\mail.php on line 2
que podrá ser?
Jose
-----Original Message-----
From: Walter D. Funk [mailto:walter@netcomproject.com]
Sent: Thursday, May 30, 2002 1:30 PM
To: lista@phpes.com
Subject: Re: [PHP-ES] mandar mail con PHP
no es muy dificil .... mail()
este pedazo de codigo envia un mail con formato html
miralo; y vas a ver que es una pavada modificarlo para
lo que necesites
<?
// Comienzo armado mail
$html ="<table width='580' border='0' cellspacing='1'
cellpadding='0'
bgcolor='#666666'><tr><td>";
$html .= "<table width='580' border='0' cellspacing='0'
cellpadding='2'
bgcolor='#DCDCE9'><tr><td height='28'
bgcolor='#FFFFFF'><font face='Verdana'
size='2'><b><u>Registración
On-Line</u></b></font></td><td
bgcolor='#FFFFFF'>";
$html .= " <tr><td height='28' width='30%'><font
face='Verdana'
size='2'><b>Datos de
usuario:</b></font></td><td></td></tr>";
$html .= " <tr><td><font face='Verdana' size='1'>Apellido
y
Nombre:</font></td><td><font face='Verdana'
size='1'>$nombre</font></td></tr>";
$html .= " <tr><td><font face='Verdana'
size='1'>Empresa</font></td><td><font face='Verdana'
size='1'>$empresa</font></td></tr>";
$html .= " <tr><td><font face='Verdana'
size='1'>Teléfono</font></td><td><font face='Verdana'
size='1'>$telefono</font></td></tr>";
$html .= " <tr><td><font face='Verdana'
size='1'>E-mail</font></td><td><font
face='Verdana' size='1'><b><a href='mailto:$email'
class='texto'>$email</a></b></font></td></tr>";
$html .= " <tr><td><font face='Verdana'
size='1'>Comentarios</font></td><td><font face='Verdana'
size='1'>$comentarios</font></td></tr>";
$html .= "</td></tr></table>";
$html .= "</td></tr></table>";
// Fin armado mail
$headers = "MIME-Version: 1.0 \n";
$headers .= "Content-type: text/html \n";
$headers .= "From: $_SERVER\n";
mail("J.GUERRERO@CGIAR.ORG", "Test", $html, $headers);
?>
----- Original Message -----
From: "Guerrero, Jose" <J.GUERRERO@CGIAR.ORG>
To: <lista@phpes.com>
Sent: Thursday, May 30, 2002 2:16 PM
Subject: [PHP-ES] mandar mail con PHP
> Saludos listeros, ojala que alguien me pueda ayudar, alguien sabe como
> mandar mails haciendo uso de PHP?
>
> Jose
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> via news: news://news.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>
---------------------------------------------------------------------
Archivo On-line: http://www.phpes.com/
via news: news://news.phpes.com/
Manual PHP en español: http://www.php.net/manual/es/
Para dar de baja la suscripción, mande un mensaje a:
lista-unsubscribe@phpes.com