Bonjour,
Voilà j'ai suivie le tutoriel sur sendMail qu'il y a sur le site et le problème, c'est qu'il y a aucun mail envoyer.

<?php
$to = ' ****** 1@gmail.com';
$subject = 'Testing sendmail.exe';
$message = 'Hi, you just received an email using sendmail!';
$headers = 'From: sender@gmail.com' . "\r\n" .
            'Reply-To: sender@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))
    echo "Email sent";
else
    echo "Email sending failed";
?>

J'ai trouver se code qui permet d'envoyer un mail et le message est "Email sending failled", comme je suis sur gmail, j'ai repris le code (a peut près...)
Voici se que j'ai:

; configuration for fake sendmail
; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.
smtp_server=stmp.gmail.com
; smtp port (normally 25)
smtp_port=587
; SMTPS (SSL) support
; auto = use SSL for port 465, otherwise try to use TLS
; ssl = alway use SSL
; tls = always use TLS
; none = never try to use SSL
smtp_ssl=auto
; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify
default_domain=gmail.com
; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging
error_logfile=error.log
; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging
;debug_logfile=debug.log
; if your smtp server requires authentication, modify the following two lines
auth_username= ***** 1@gmail.com
auth_password= ******** a
; if your smtp server uses pop3 before smtp authentication, modify the 
; following three lines. do not enable unless it is required.
pop3_server=
pop3_username=
pop3_password=
; force the sender to always be the following email address
; this will only affect the "MAIL FROM" command, it won't modify 
; the "From: " header of the message content
force_sender= **** 1@gmail.com
; force the sender to always be the following email address
; this will only affect the "RCTP TO" command, it won't modify 
; the "To: " header of the message content
force_recipient=
; sendmail will use your hostname and your default_domain in the ehlo/helo
; smtp greeting. you can manually set the ehlo/helo name if required
hostname=

Voilà, dite moi si j'ai fait une erreur car actuellement, mon wamp et vert et mes mot de passe et correcte.

Merci de votre aide.
Cordialement;

22 réponses


Tu est sur un serveur ou en localhost ?

JE suis en localhost.

Je fait un up.

A-tu mis ton serveur localhost "en ligne" ? Et ouvert le port 80 de ta box ?

Si c'est non, sa vient de la.

Tout est actif, je me pose la question si il faut ouvrir le port "587"

up

Tu est chez quel operateur ?

Chez darty box.
Mais, faut t'il que je ouvre le port ?

Oui, tu doit ouvrir le port 80 et passer ton serveur localhost en mode "En ligne".

Le port 80 est ouvert mais je parle du port : 587 de SendMail ?

Personnellement, j'ai pas eu a ouvrir d'autre port que le 80, voici ma config dans le php.ini :
Juste a renseigner le SMTP de ton fournisseur d'acces, et le port 25 ou 587.

http://www.dartybox.com/cms/web/assistance/configurer-mon-compte-dartybox-sur-un-logiciel-de-messagerie-dartybox

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.sfr.fr
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = noreply@localhost.com

Moi je trouve sa pour le SMTP : smtp.live.com
C'est celui ci que je doit mettre ?

Oui, et essaye avec le port 25.

Salutt,
J'ai pris ton code pour le fichier "php.ini"
Voici le code :

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.live.com
; http://php.net/smtp-port
smtp_port = 587

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = noreply@localhost.com

Et maintenant j'ai cette erreur :
Warning: mail() <a href='function.mail'>function.mail</a>]: SMTP server response: 501 5.5.4
J'ai essayer avec le port 25 et 587 mais toujours la même erreur, tu sait comment activer mail() ?

up

up

Up, je voudrais qu'on m'aide merci.

Bonsoir ,
Je voulais te demander si tu as reglé ton probleme ?

Personnellement sous windows 8.1 sendmail ne fonctionne pas.

Personnellement sous windows 8.1 sendmail ne fonctionne pas.

Tu dois voir un problème de configuration, car il fonctionne parfaitement pour ma part et je suis également sous Windows 8.1

bonjour
je maîtrise mieux l'administration sous linux mais je crois que sous Windows le principe est le même.
sendmail utilise le serveur smtp pour envoyer des alertes.
ici tu as configuré sendmail pour qu'il ecoute le port 587, mais est ce bien sur ce port que tourne ton serveur smtp?
car le port par defaut du smtp est de 25 et si la modification de port n'a pas également été faite à ce niveau, je crois que c'est de là que viens ton probleme.
je pense que ce lien peut t'etre utile:
http://msdn.microsoft.com/fr-fr/library/8b83ac7t(v=vs.100).aspx