Bonjour,

J'ai un problème avec l'envoie de mail et le FOSUserBundle
Je suis en local avec Mysql donc déjà ça complique tous .

j'ai le message suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
Warning: stream_socket_client() [<a href='function.stream-socket-client'>function.stream-socket-client</a>]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport &quot;ssl&quot; - did you forget to enable it when you configured PHP?) in C:\wamp\www\project\vendor\swiftmailer\lib\classes\Swift\Transport\StreamBuffer.php line 263
J'ai du mal faire toutes la configuration :
voila mes fichier de conf :

parameters.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
16
17
18
19
20
 
; These parameters can be imported into other config files
; by enclosing the key with % (like %database_user%)
; Comments start with ';', as in php.ini
[parameters]
    database_driver   = pdo_mysql
    database_host     = localhost
    database_port     =
    database_name     = perso-bdd
    database_user     = root
    database_password =
 
    mailer_transport  = gmail
    mailer_host       = localhost
    mailer_user       = Le-nom-lutilisateur-de-mon-pc
    mailer_password   = *******
 
    locale            = en
 
    secret            = ThisTokenIsNotSoSecretChangeIt
config.yml
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
 
# Swiftmailer Configuration
swiftmailer:
    transport:  gmail
    username:  MonAdresse@gmail.com
    password:  *****
 
jms_security_extra:
    secure_controllers:  true
    secure_all_services: false
#UserBundle
fos_user:
    db_driver:     orm
    firewall_name: main
    use_listener: false
    user_class:   project\UtilisateurBundle\Entity\Utilisateur
    registration:
        confirmation:
            enabled:    true
            from_email: 
                address:        MonAdresse@gmail.com
                sender_name:    apply Utilisateur Registration
    resetting:
        email:
            from_email:
                address:        MonAdresse@gmail.com
                sender_name:    apply Utilisateur Resetting
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
16
17
18
19
20
21
22
23
24
25
26
 
[mail function]
; For Win32 only.
; http://php.net/smtp
;SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
 
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = MonAdresse@gmail.com
 
; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = "C:\Wamp\sendmail\sendmail.exe"
 
; 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(), even in safe mode.
;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
 
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
D’après le message d'erreur le problème viens surement du php.ini mais je sais pas trop quoi faire.