[英]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.