当我从Spring Boot应用程序发送电子邮件时出现以下错误。
org.springframework.mail.MailSendException:失败的消息: com.sun.mail.smtp.SMTPSendFailedException:550 5.7.60 SMTP;客户 没有作为此发件人发送的权限
以下是我的应用程序属性:
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class callserv1 extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("This Example demonstrates, using Ajax request to Access Servlet ");
String num = request.getParameter("num");
out.println("i am in" +num);
}
}
答案 0 :(得分:0)
请检查是否有阻止gmail的防火墙启动