Ciao a tutti.
come si fa a spedire email da php ? ho cercato su www.php.net ed ho trovato "mail"
ma per esempio non c'è scritto come si fa a metter un indirizzo in cc.
sapete darmi qualche indicazione??
grazie![]()
Ciao a tutti.
come si fa a spedire email da php ? ho cercato su www.php.net ed ho trovato "mail"
ma per esempio non c'è scritto come si fa a metter un indirizzo in cc.
sapete darmi qualche indicazione??
grazie![]()
Qui: http://it.php.net/manual/en/function.mail.php
c'è questo esempio:
Codice PHP:
// multiple recipients
$to = 'aidan@example.com' . ', '; // note the comma
$to .= 'wez@example.com';
// subject
$subject = 'Birthday Reminders for August';
// message
// 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 <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: [email]birthdayarchive@example.com[/email]' . "\r\n";
$headers .= 'Bcc: [email]birthdaycheck@example.com[/email]' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
ok perfetto. grazie mille.
che sappiate c'è anche un modo di specificare l'indirizzo dal quale mandare l'email ?
Chiedo questo perke il server che uso è configurato per più siti web e utilizza quello di default per mandare email.
c'è un modo per far mandare da un qualsiasi indirizzo email ?
grazie![]()
Ma intendi l'indirizzo figurativo "mittente", o il server smtp per l'invio?
Se è la prima:
mail("$destinatario, $testo, "From: info@indirizzochevuoitu.com");