mail from address must be same as authorization user

本文介绍了当使用QQ邮箱发送邮件遇到mailfromaddressmustbesameasauthorizationuser错误时的解决方法,包括检查POP3/SMTP是否开启及正确设置账号密码。

mail from address must be same as authorization user的解决办法

qq邮箱发送,mail from address must be same as authorization user

mail from address must be same as authorization user这信息提示有以下两种:

1.未开启pop3或者smtp

2.账号密码错误
这里写图片描述

邮箱密码和扣扣登陆密码不一样 需要进行下面的操作获取密码,并且开启下图服务。

使用邮件发送代码,必须在邮箱登录页面保证这个邮箱能登录进去,才能开始测试邮件发送。

企业QQ的话,pop3 ,IMAP,STMP的开启是在设置-客户端

电脑网页端在设置-账户下设置的
这里写图片描述

org.springframework.mail.MailSendException: Failed to close server connection after message failures; nested exception is javax.mail.MessagingException: Can't send command to SMTP host; nested exception is: java.net.SocketException: Connection or outbound has closed. Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 501 Mail from address must be same as authorization user. ; nested exception is: com.sun.mail.smtp.SMTPSenderFailedException: 501 Mail from address must be same as authorization user. ; message exception details (1) are: Failed message 1: com.sun.mail.smtp.SMTPSendFailedException: 501 Mail from address must be same as authorization user. ; nested exception is: com.sun.mail.smtp.SMTPSenderFailedException: 501 Mail from address must be same as authorization user. at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2374) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1808) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1285) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:465) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:323) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:312) at com.zbu.reggie.controller.testUserController.testSendMail(testUserController.java:21) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$Valid
最新发布
04-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值