简体   繁体   English

错误:com.sun.mail.smtp.SMTPAddressFailedException:554 5.7.1:收件人地址被拒绝:SASLUsername 域和发件人域不同

[英]Error: com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 : Recipient address rejected: SASLUsername Domain and Sender Domain Are Differnet

I am tying to send email using JavaMailSender.我打算使用 JavaMailSender 发送 email。 I am able to send email to my gmail and company email account using this configuration.我可以使用此配置将 email 发送到我的 gmail 和公司 email 帐户。

mail:
        host: smtp.gmail.com
        port: 587
        username: aashbeyv@gmail.com
        password: ***************
        protocol: smtp
        properties.mail.smtp:
            auth: true
            starttls.enable: true
            ssl.trust: smtp.gmail.com

But when I use another server hosted from zimbra.com with the following config I get this error: "com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 rg20@gmail.com: Recipient address rejected: SASLUsername Domain and Sender Domain Are Differnet - Sender Blocked" But when I use another server hosted from zimbra.com with the following config I get this error: "com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 rg20@gmail.com: Recipient address rejected: SASLUsername Domain and Sender Domain是不同的网络 - 发件人被阻止”

mail:
        host: mail.aaktute.com
        port: 25 (or 587)
        username: noreply@aaktute.com
        password: **************
        protocol: smtp
        properties.mail.smtp:
            auth: true
            starttls.enable: false
            ssl.trust: mail.aaktute.com
            sockeFactory.class: javax.net.ssl.SSLSocketFactory
            ssl.protocols: TLSv1

When I change starttls.enable: true I get error: javax.mail.MessagingException: Could not convert socket to TLS;当我更改 starttls.enable: true 时出现错误:javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLHandshakeException: Certificates do not conform to algorithm constraints嵌套异常是:javax.net.ssl.SSLHandshakeException:证书不符合算法约束

After I remove sockeFactory.class: javax.net.ssl.SSLSocketFactory and ssl.protocols: TLSv1 I get Error: the-server-selected-protocol-version-tls10-is-not-accepted-by-client-preferences After I remove sockeFactory.class: javax.net.ssl.SSLSocketFactory and ssl.protocols: TLSv1 I get Error: the-server-selected-protocol-version-tls10-is-not-accepted-by-client-preferences

Can anyone help me out resolving these configurational issues.谁能帮我解决这些配置问题。

This is happening because Zimbra has a setting which ensures that the credentials used for sending and authentication need to be same.发生这种情况是因为 Zimbra 有一个设置,可确保用于发送和身份验证的凭据必须相同。 Please check your code to ensure that your javamail From and auth are using the same email address.请检查您的代码以确保您的 javamail From 和 auth 使用相同的 email 地址。 This should solve the error.这应该可以解决错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Boot 邮件发件人错误:com.sun.mail.smtp.SMTPSendFailedException - Error at Spring Boot mail sender: com.sun.mail.smtp.SMTPSendFailedException 使用 AWS SES SMTP-错误 554 消息被拒绝:Email 地址未验证。 以下身份未通过区域签入 - Using AWS SES SMTP- error 554 Message rejected: Email address is not verified. The following identities failed the check in region 需要通过no-reply@domain.com实现Java Mail - Needs to Implement Java Mail with no-reply@domain.com Spring Mail Sender 使用 Gmail SMTP 错误。 我该如何修复? - Spring Mail Sender using Gmail SMTP error . How can I fixed? Spring Mail 中不允许使用域文字问题 - Domain literals not allowed Issue in Spring Mail Spring/Java Mail:发件人始终是 spring.mail.username。 FROM 地址被忽略 - Spring/Java Mail:The sender is always the spring.mail.username. The FROM address is being ignored JSON解析错误:无法构造`com.example.greetapp.domain.User`的实例 - JSON parse error: Cannot construct instance of `com.example.greetapp.domain.User` 邮件服务器连接失败; 嵌套异常是 com.sun.mail.util.MailConnectException:无法连接到主机,端口:localhost,25; 超时-1; - Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1; 为什么找不到'boolean com.sun.mail.util.PropUtil.getBooleanSessionProperty(javax.mail.Session, Z93F725A07423FE1C889F6Z8B33D21'F4)? - Why is 'boolean com.sun.mail.util.PropUtil.getBooleanSessionProperty(javax.mail.Session, java.lang.String, boolean)' not found? 554 交易失败错误:此帐户的发送已暂停 - 554 transcation failed error : sending paused for this account
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM