Sendmail avec php
MCROMEO
Messages postés
100
Statut
Membre
-
MCROMEO Messages postés 100 Statut Membre -
MCROMEO Messages postés 100 Statut Membre -
Bonjour,
je tente d'envoyer des mails via php. Jai donc utilise sendmail avec cette configuration :
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=465
error_logfile=error.log
debug_logfile=debug.log
[email protected]
auth_password=xxxx
pop3_server=
pop3_username=
pop3_password=
[email protected]
force_recipient=
hostname=
smtp_ssl=ssl
Et j'execute ce code php :
<?php
$to = '[email protected]';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))
{mail($to, $subject, $message, $headers);
echo "Email sent";
}
else
echo "Email sending failed";
?>
Je recoi comme resultat : Email sent mais aucun mail n'est envoye car je ne vois rien ds la boite de reception.
Merci de m'aider
je tente d'envoyer des mails via php. Jai donc utilise sendmail avec cette configuration :
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=465
error_logfile=error.log
debug_logfile=debug.log
[email protected]
auth_password=xxxx
pop3_server=
pop3_username=
pop3_password=
[email protected]
force_recipient=
hostname=
smtp_ssl=ssl
Et j'execute ce code php :
<?php
$to = '[email protected]';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'MIME-Version: 1.0' . "\r\n" .
'Content-type: text/html; charset=iso-8859-1' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if(mail($to, $subject, $message, $headers))
{mail($to, $subject, $message, $headers);
echo "Email sent";
}
else
echo "Email sending failed";
?>
Je recoi comme resultat : Email sent mais aucun mail n'est envoye car je ne vois rien ds la boite de reception.
Merci de m'aider
A voir également:
- Sendmail avec php
- Expert php - Télécharger - Langages
- Easy php - Télécharger - Divers Web & Internet
- Ide php - Télécharger - Web & Internet
- Retour a la ligne php ✓ - Forum PHP
- Php alert ✓ - Forum PHP