Fonction mail() et serveur smtp en lotre...
jsoutest
-
jsoutest -
jsoutest -
Bonjour,
J'ai le même problème que celui exposé dans le post suivant:
Fonction mail() et serveur smtp en local
fab1105 116Messages postés 4 août 2009Date d'inscription 31 mai 2010Dernière intervention - 31 aoû 2009 à 12:23 - Dernière réponse le 2 sep 2009 à 11:29 le père
Malheureusement rien n'y fait j'ai beau éditer le PHP;INI et mettre le fameux $headers from sender@gmail.com par exemple, j'ai toujours la même erreur :
Warning: mail() [function.mail]: SMTP server response: 504 5.5.2 <you@yourdomain>: Sender address rejected: need fully-qualified address in C:\wamp\www\TESTPHP\Test-mail.php on line 19
et le php.ini est toujours par défaut à :
sendmail_from you@yourdomain you@yourdomain
Comment l'expliquer ?
Voici mon code PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
ini_set ( "SMTP", "smtp.free.fr" );
$to = "moi@gmail.com";
$subj = "Test";
$mess = " Ceci est un test de mail";
;$headers = "bcc: autremoi@yahoo.fr";
$headers = "From:moi@gmail.com";
phpinfo();
$mailsend = mail($to,$subj,$mess,$headers);
echo $mailsend;
?>
</body>
</html>
Voici mon php.ini:
[mail function]
; For Win32 only.
; https://www.php.net/manual/en/mail.configuration.php#ini.smtp
SMTP = localhost
;SMTP = smtp.free.fr
; https://www.php.net/manual/en/mail.configuration.php#ini.smtp-port
smtp_port = 25
; For Win32 only.
; https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
;sendmail_from = you@yourdomain
;sendmail_from = moi@free.fr
sendmail_from = moi@gmail.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
;sendmail_path =
J'ai le même problème que celui exposé dans le post suivant:
Fonction mail() et serveur smtp en local
fab1105 116Messages postés 4 août 2009Date d'inscription 31 mai 2010Dernière intervention - 31 aoû 2009 à 12:23 - Dernière réponse le 2 sep 2009 à 11:29 le père
Malheureusement rien n'y fait j'ai beau éditer le PHP;INI et mettre le fameux $headers from sender@gmail.com par exemple, j'ai toujours la même erreur :
Warning: mail() [function.mail]: SMTP server response: 504 5.5.2 <you@yourdomain>: Sender address rejected: need fully-qualified address in C:\wamp\www\TESTPHP\Test-mail.php on line 19
et le php.ini est toujours par défaut à :
sendmail_from you@yourdomain you@yourdomain
Comment l'expliquer ?
Voici mon code PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
ini_set ( "SMTP", "smtp.free.fr" );
$to = "moi@gmail.com";
$subj = "Test";
$mess = " Ceci est un test de mail";
;$headers = "bcc: autremoi@yahoo.fr";
$headers = "From:moi@gmail.com";
phpinfo();
$mailsend = mail($to,$subj,$mess,$headers);
echo $mailsend;
?>
</body>
</html>
Voici mon php.ini:
[mail function]
; For Win32 only.
; https://www.php.net/manual/en/mail.configuration.php#ini.smtp
SMTP = localhost
;SMTP = smtp.free.fr
; https://www.php.net/manual/en/mail.configuration.php#ini.smtp-port
smtp_port = 25
; For Win32 only.
; https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
;sendmail_from = you@yourdomain
;sendmail_from = moi@free.fr
sendmail_from = moi@gmail.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-path
;sendmail_path =
A voir également:
- Fonction mail() et serveur smtp en lotre...
- Fonction si et - Guide
- Serveur de reception mail - Guide
- Changer serveur dns - Guide
- Windows live mail - Télécharger - Mail
- Mail avast 499 euros ✓ - Forum Virus
2 réponses
Du nouveau.
Avec ma version de Wampserver l'édition du PHP.INI ne fonctionne pas ainsi que le $headers.
J'ai du faire un ini_set aussi bien pour le SMTP que pour le From sender.
Mystère? Est-ce que quelqu'un a eu le même problème?
Par contre bien ennuyeux pour le $headers car on est limité dans les options telles que CC: BCC: etc.....
Merci si quelqu'un connait la raison d'une apparente incompatibilité avec Wampserver.
Avec ma version de Wampserver l'édition du PHP.INI ne fonctionne pas ainsi que le $headers.
J'ai du faire un ini_set aussi bien pour le SMTP que pour le From sender.
Mystère? Est-ce que quelqu'un a eu le même problème?
Par contre bien ennuyeux pour le $headers car on est limité dans les options telles que CC: BCC: etc.....
Merci si quelqu'un connait la raison d'une apparente incompatibilité avec Wampserver.