在通过mailR包发送邮件时寻找此错误的解决方案。 当我发送普通的文本邮件时,它会正常发送,但是当将其保存为html格式的HTML邮件时,它会失败并显示错误。
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:465
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
at org.apache.commons.mail.Email.send(Email.java:1437)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at RJavaTools.invokeMethod(RJavaTools.java:386)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 552-5.7.0 This message was blocked because its content presents a potential
552-5.7.0 security issue. Please visit
552-5.7.0 https://support.google.com/mail/?p=BlockedMessage to review our
552 5.7.0 message content and attachment content guidelines. k10-v6sm26095359pfj.29 - gsmtp
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2202)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1980)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1197)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
... 6 more
Error: EmailException (Java): Sending the email to the following server failed : smtp.gmail.com:465
我在周围搜索了此解决方案,但还是失败了,也从gethub页面测试了mailR的更新代码,但仍然失败。
问候 佛山市