Envoie un email avec sendmail
thibautB
Messages postés
140
Date d'inscription
Statut
Membre
Dernière intervention
-
thibautB Messages postés 140 Date d'inscription Statut Membre Dernière intervention -
thibautB Messages postés 140 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
depuis 2 jours j'essaie de comprendre comment envoyer un mail sous wamp en local donc pour ça j'ai suivi un tuto mais il me retourne une erreur du style : Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp64\www\php\sendmail.php on line 3
ainsi je verifie la bonne syntaxe de mon fichier sendmail.php et je reverifie php.ini et sendmail.ini, mais je ne voie aucune fautes, voici mes trois fichiers :
sendmail.php :
sendmail.ini
php.ini:
depuis 2 jours j'essaie de comprendre comment envoyer un mail sous wamp en local donc pour ça j'ai suivi un tuto mais il me retourne une erreur du style : Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp64\www\php\sendmail.php on line 3
ainsi je verifie la bonne syntaxe de mon fichier sendmail.php et je reverifie php.ini et sendmail.ini, mais je ne voie aucune fautes, voici mes trois fichiers :
sendmail.php :
<?php
mail('thermos111@hotmail.fr','test','test admin',null,'From: thibaut.desaintvenant@hotmail.com');
?>
sendmail.ini
[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.live.com
; smtp port (normally 25)
smtp_port=25
; 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=mydomain.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= monemail@hotmail.com
auth_password= monpassword
php.ini:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = stmp.live.com
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from ="postmaster@localhost"
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = "\""C:\wamp64\sendmail\sendmail.exe"-t"
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail().
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog
A voir également:
- Envoie un email avec sendmail
- Comment creer un compte email - Guide
- Créer un compte email gratuit hotmail - Guide
- Facebook piraté et adresse email changé - Guide
- Comment supprimer un compte email - Guide
- Envoie impossible messenger - Forum Facebook Messenger
1 réponse
Bonjour
le message indique que le port 25 est bloqué, essaye le port 587.
si cela ne fonctionne toujours pas, va sur le forum de wampserver, tu y trouveras surement des solutions.
le message indique que le port 25 est bloqué, essaye le port 587.
si cela ne fonctionne toujours pas, va sur le forum de wampserver, tu y trouveras surement des solutions.
thibautB
Messages postés
140
Date d'inscription
Statut
Membre
Dernière intervention
1
j'ai tester la solution de grafikart : https://www.grafikart.fr/blog/mail-local-wamp mais ça ne marche pas...