Comment envoyer des mails en php
Résolu/Fermé
mobrobot
Messages postés
173
Date d'inscription
vendredi 13 janvier 2017
Statut
Membre
Dernière intervention
8 mai 2023
-
Modifié le 13 déc. 2017 à 17:09
Mobrobot - 14 déc. 2017 à 21:25
Mobrobot - 14 déc. 2017 à 21:25
A voir également:
- Comment envoyer des mails en php
- Comment envoyer un mail avec accusé de réception - Guide
- Envoyer un mail en cci - Guide
- Je reçois des mails mais je ne peux pas en envoyer outlook - Forum Mail
- Envoyer sms par internet - Guide
- Comment rétablir la réception des mails ? - Forum Mail
1 réponse
jordane45
Messages postés
38144
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
21 avril 2024
4 650
13 déc. 2017 à 20:29
13 déc. 2017 à 20:29
Bonjour,
je pense déjà voir une erreur au niveau du fichier de config de sendmail.
Il devrait ressembler au minimum à ça :
ou mieux :
Pour le port, faut tester soit le smtp_port=465 soit le smtp_port=587
Il faut également que tu édites ton fichier PHP.INI
Je t'invite à lire ce tuto
https://dfarnier.fr/serveur-mail-wampserver/
Ou celui la
https://www.grafikart.fr/blog/mail-local-wamp
NB : Bien entendu, après toute modification du fichier INI ..... il faut redémarrer les service APACHE
je pense déjà voir une erreur au niveau du fichier de config de sendmail.
Il devrait ressembler au minimum à ça :
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
default_domain=gmail.com
error_logfile=error.log
auth_username=********@gmail.com
auth_password=******
pop3_server=
pop3_username=
pop3_password=
force_sender=****@gmail.com
force_recipient=
hostname=
ou mieux :
; 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=smtp.gmail.com
; smtp port (normally 25)
smtp_port=465
; 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=smtp.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=xxxxx@gmail.com
auth_password=xxxxxxx
; 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=xxxxx@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=
Pour le port, faut tester soit le smtp_port=465 soit le smtp_port=587
Il faut également que tu édites ton fichier PHP.INI
[mail function]
; For Win32 only.
; https://www.php.net/manual/en/mail.configuration.php#ini.smtp
;SMTP =
; https://www.php.net/manual/en/mail.configuration.php#ini.smtp-port
smtp_port = 465
; For Win32 only.
; https://www.php.net/manual/en/mail.configuration.php#ini.sendmail-from
;sendmail_from =
; 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 = "C:\Wamp\sendmail\sendmail.exe"
Je t'invite à lire ce tuto
https://dfarnier.fr/serveur-mail-wampserver/
Ou celui la
https://www.grafikart.fr/blog/mail-local-wamp
NB : Bien entendu, après toute modification du fichier INI ..... il faut redémarrer les service APACHE
14 déc. 2017 à 21:25