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
auth_username=xxxxx@gmail.com
auth_password=xxxx
pop3_server=
pop3_username=
pop3_password=
force_sender=xxxxx@gmail.com
force_recipient=
hostname=
smtp_ssl=ssl
Et j'execute ce code php :
<?php
$to = 'xxxxxx@yahoo.fr';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: xxxxx@gmail.com' . "\r\n" .
'Reply-To: xxxxx@gmail.com' . "\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
auth_username=xxxxx@gmail.com
auth_password=xxxx
pop3_server=
pop3_username=
pop3_password=
force_sender=xxxxx@gmail.com
force_recipient=
hostname=
smtp_ssl=ssl
Et j'execute ce code php :
<?php
$to = 'xxxxxx@yahoo.fr';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: xxxxx@gmail.com' . "\r\n" .
'Reply-To: xxxxx@gmail.com' . "\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
- Easy php - Télécharger - Divers Web & Internet
- Expert php pinterest - Télécharger - Langages
- Retour a la ligne php - Forum Webmastering
- Alert php - Forum PHP
- Retour a la ligne php ✓ - Forum PHP