Shopware 6邮件无法发送求助:Sender mismatch错误
Shopware 6邮件发送失败:550 5.7.1 Sender mismatch错误解决
问题背景
已完成Shopware 6的安装与配置,且在后台【设置→系统→邮件服务】(路径:/admin#/sw/settings/mailer/index)完成邮件配置,但订单确认、联系表单等邮件均无法发送。查看var/log/prod-2023-01-15.log日志,出现以下报错:
[2023-01-15T16:26:33.140153+00:00] app.ERROR: Could not send mail: Failed sending mail to following recipients: {{ recipients }} with Error: Expected response code „250“ but got code „550“, with message „550 5.7.1 Sender mismatch“. Error Code:0 Template data: {„recipients“:{„thorsten.niehues@posteo.net“:"thorsten.niehues@posteo.net"},„senderName“:„{{ salesChannel.name }}“,„salesChannelId“:„c6aa23ebbf0b48d490237ff19bdb47b3“,„templateId“:„5e09e2c5fdb248da8329b09b16d8b6ef“,„customFields“:null,„contentHtml“:„ The following Message was sent to you via the contact form.<br/> <br/> Contact name: {{ contactFormData.firstName }} {{ contactFormData.lastName }} <br/> Contact email address: {{ contactFormData.email }} <br/> Phone: {{ contactFormData.phone }}<br/> <br/> Subject: {{ contactFormData.subject }}<br/> <br/> Message:<br/> {{ contactFormData.comment|nl2br }}<br/> </p> “, „contentPlain“:„The following Message was sent to you via the contact form. Contact name: {{ contactFormData.firstName }} {{ contactFormData.lastName }} Contact email address: {{ contactFormData.email }} Phone: {{ contactFormData.phone }} Subject: {{ contactFormData.subject }} Message: {{ contactFormData.comment }} “,„subject“:„Contact form received - {{ salesChannel.name }}“,„mediaIds“:}
尝试移除模板中所有变量以排除模板问题后,仍出现相同错误:
[2023-01-15T16:32:14.098476+00:00] app.ERROR: Could not send mail: Failed sending mail to following recipients: {{ recipients }} with Error: Expected response code „250“ but got code „550“, with message „550 5.7.1 Sender mismatch“. Error Code:0 Template data: {„recipients“:{„thorsten.niehues@posteo.net“:"thorsten.niehues@posteo.net"},„senderName“:„PlsUseVariable“,„salesChannelId“:„c6aa23ebbf0b48d490237ff19bdb47b3“,„templateId“:„5e09e2c5fdb248da8329b09b16d8b6ef“,„customFields“:null,„contentHtml“:„Test Contact Form / Email (HTML)“, „contentPlain“:„Test Contact Form / Email (Plain)“,„subject“:„Contact Request“,„mediaIds“:}
错误原因
550 5.7.1 Sender mismatch是邮件服务器验证机制触发的错误,核心原因是邮件发件人地址与SMTP认证使用的邮箱地址不一致,邮件服务商(此处为Posteo)拒绝发送这类邮件。
解决步骤
核对全局邮件发件人配置
进入后台【设置→系统→邮件服务】,确保"发件人地址"与SMTP认证用的邮箱地址完全一致,注意大小写和后缀(部分服务商严格校验)。检查销售渠道独立邮件配置
Shopware允许每个销售渠道单独设置发件人:- 进入【销售渠道】选择对应渠道
- 切换到【基本设置】→【邮件】标签页
- 确认此处的"发件人地址"与SMTP认证地址匹配,若不一致则修改为认证邮箱地址。
排除插件干扰
暂时禁用所有第三方邮件相关插件,重新测试邮件发送。若恢复正常,说明是插件修改了发件人地址,需排查对应插件的配置。确认服务商限制
部分邮件服务商(如Posteo)不允许使用与认证账号不同的发件人地址,必须使用认证邮箱作为发件人。可查看服务商官方文档确认规则,若有此限制,需统一所有发件人配置为认证邮箱。
内容的提问来源于stack exchange,提问作者Thorsten Niehues
相关产品推荐
相关产品推荐

