Configure Symfony2/Swiftmailer to use “sendmail -t”

前端 未结 3 1085
旧时难觅i
旧时难觅i 2020-12-11 18:45

I\'m currently trying to get Symfony2/Swiftmailer to send the contents of a submitted form via mail. My parameters.yml contains the following:

mailer_transpo         


        
3条回答
  •  难免孤独
    2020-12-11 19:34

    Just spent the day on this very issue.

    I prefer using straight configuration for this kind of thing, and I found this to work:

    # app/config/services.yml
    services:
      swiftmailer.mailer.default.transport:
        class:     Swift_SendmailTransport
        arguments: ['/usr/sbin/sendmail -t']
    

提交回复
热议问题