修复symfony下swiftmail 无法发送邮件的问题

wpcraft项目中,本来是支持在部分情况下自动发送邮件的,但是今天测试一下发现好像不好使了,并且印象中好像没有修改到swiftmail的配置,甚至一度怀疑是smtp服务器把我的IP屏蔽了的缘故,但是后来试了一下phpmail却可以正常发送邮件,对比了一下,好像swiftmail默认的配置缺少点东西,于是按如下补上,修改app/config/parameters.yml

swiftmailer:
    transport: '%mailer_transport%'
    host: '%mailer_host%'
    username: '%mailer_user%'
    password: '%mailer_password%'
    port: '587'
    encryption: 'tls'
    spool: { type: memory }

添加了portencryption两个参数,结果一切正常,至于为什么突然要加这两项配置,我也挺纳闷…