Bonjour a tous,
j'aimerais en fait envoyer un mail en php mais j'ai un souci avec cette fonction
php.ini
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15<?php $to = 'test@gmail.com'; $subject = 'test'; $message = 'Bonjour voici un test!'; $headers = 'From: admin@gmail.com' . "\r\n" . 'Reply-To: admin@gmail.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $x = mail($to, $subject, $message, $headers); if ($x === true) echo 'le mail a bien été envoyé !!!'; else echo 'echec de l\'envoi du mail :/'; ?>
voila le méssage d'erreur que ça me donne
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 [mail function] ; For Win32 only. ; http://php.net/smtp ; SMTP = localhost SMTP = smtp.gmail.com ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path ;sendmail_path = ; 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 sendmail_from="admin@gmail.com" ; 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
Warning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. c20sm24743764wre.28 - gsmtp in C:\wamp\www\ProjetGreta\Vue\accueil\contenuEcouteClient\v_particulier.php on line 99
echec de l'envoi du mail :/
je n'arrive pas a envoyer le mail. si quelqu'un peut m'aider ça serai génial mercii !!








Répondre avec citation



Consultez nos FAQ : 


Affichez votre code en couleurs : [CODE=php][/CODE] (bouton # de l'éditeur) et [C=php][/C]
Partager