首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >使用Symfony 4发送邮件:没有错误但没有收到邮件?

使用Symfony 4发送邮件:没有错误但没有收到邮件?
EN

Stack Overflow用户
提问于 2018-09-29 01:35:56
回答 1查看 0关注 0票数 0

我正在尝试使用控制台向Swiftmailer发送一封简单的邮件。最后,控制台回应[OK] 1 emails were successfully sent.,但我的邮箱中没有收到邮件(注意:我的mailphp函数运行完美):

php bin/console swiftmailer:email:send

从:

send@example.com

至:

recipient@example.com

学科:

你好

身体:

你好

这是我的config/packages/swiftmailer.yaml

代码语言:javascript
复制
swiftmailer:
    url: '%env(MAILER_URL)%'
    #spool: { type: 'memory' }
    transport:            smtp
    username:             username@host.com
    password:             mypassword
    host:                 smtp.host.com
    port:                 465
    encryption:           ssl
    auth_mode:            login
    spool:
        type:                 file
        path:                 '%kernel.cache_dir%/swiftmailer/spool'
    sender_address:       username@host.com
    antiflood:
        threshold:            99
        sleep:                0
    delivery_addresses:   []
    disable_delivery:     ~
    logging:              '%kernel.debug%'
    #stream_options:
    #    ssl: 
    #        allow_self_signed: true
    #        verify_peer: false
    #        verify_peer_name: false

我的.env档案:

代码语言:javascript
复制
###> symfony/swiftmailer-bundle ###
# For Gmail as a transport, use: "gmail://username:password@localhost"
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
# Delivery is disabled by default via "null://localhost"
MAILER_URL=smtp://smtp.host.com:465?encryption=ssl&auth_mode=login&username=username@host.com&password=mypassword
###< symfony/swiftmailer-bundle ###

任何想法 ?感谢帮助。

EN

回答 1

Stack Overflow用户

发布于 2018-09-29 11:05:32

您的配置对我来说似乎很好。您是否检查过帐户中是否存在“安全警报”,导致您无法从未知位置登录?

GoogleMail将此功能称为“允许安全性较低的应用”。您应该检查收件箱或邮件帐户的提示。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100002799

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档