Search code examples
symfonyfosuserbundleemail-confirmation

confirmation email not sent after registration in FOSUserBundle


My project is based on symfony 2.3.19 + lastest version version FOSUserBundle.

Actually, FOSuserBundle is working perfectly. In fact, all functionnalities are working correctly. Now, my goal is to activate the email confirmation when a user registers. For that, I configured my project in this way:

# app/config.yml

# Swiftmailer Configuration
swiftmailer:
    transport: %mailer_transport%
    host:      %mailer_host%
    username:  %mailer_user%
    password:  %mailer_password%
    spool:     { type: memory }

fos_user:
    db_driver: orm 
    firewall_name: main
    user_class: Minn\UserBundle\Entity\User
    registration:
        form:
            type: minn_user_registration    
        confirmation:
            enabled:    true 
            template:   MinnUserBundle:Registration:email.txt.twig        
            from_email: 
                address: XXXXXXX@gmail.com
                sender_name: XXXXXXX  
    service:
        mailer:  fos_user.mailer.twig_swift

Checking this configuration, I get forwarded to /register/check-email with the message I wrote in MinnUserBundle:Registration:email.txt.twig. But no email was sent & no error was returned by symfony.

It there any idea?

Thanks,


Solution

  • It was just an error on SMTP credentials.... Thanks again....