Comunidad de diseño web y desarrollo en internet online

funcion mail() PHP

Citar            
MensajeEscrito el 05 Jul 2006 04:46 pm
Buenas!...

Alguien sabe como hacer que el mail "From" no sea un mail? O sea, en lugar de "[email protected]", que sea "sarasa"...

Grax!!

Pablo

Por _pablito_

Claber

190 de clabLevel



Genero:Masculino  

Argentina

firefox
Citar            
MensajeEscrito el 08 Jul 2006 05:44 am

Código :

<?php
// multiple recipients
$to  = '[email protected]' . ', '; // note the comma
$to .= '[email protected]';

// subject
$subject = 'Birthday Reminders for August';

// message
$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
   <tr>
     <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
   </tr>
   <tr>
     <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
   </tr>
   <tr>
     <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
   </tr>
  </table>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n";
$headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$headers .= 'Bcc: [email protected]' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);
?> 

Esto fue un coppy-paste de php.net. me tarde menosde un minuto, buscar, no cuesta nada!

Por Cep

BOFH

1509 de clabLevel

9 tutoriales

1 ejemplo

Genero:Masculino   REC Bastard Operators From Hell

Web Developer

firefox
Citar            
MensajeEscrito el 10 Jul 2006 06:51 am
Resumiendo...

solo debes poner las cabecerasde esta manera

Código :

$cabecerass = 'To: NombreDestinatario <[email protected]>' . "\r\n";
$cabecerass = 'From: NombrePersona <[email protected]>' . "\r\n";


Salu2

Por 3w

145 de clabLevel



Genero:Masculino  

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.