【发布时间】:2016-03-07 14:39:30
【问题描述】:
我正在使用 sendgrid,这是我的 java 代码:
public void sendEmail(String templateID){
SendGrid sendgrid = new SendGrid("username", "password");
Email email = new Email();
email.addTo("...");
email.addToName("...");
email.setFrom("...");
email.setSubject("...");
email.setText("...");
email.setTemplateId(templateID);
try {
sendgrid.send(email);
} catch (SendGridException ex) {
Logger.getLogger(FXMLEditNewsLetterController.class.getName()).log(Level.SEVERE, null, ex);
}
}
邮件正在发送(我不知道为什么它们会被视为垃圾邮件!!)但它们是以纯文本形式发送的。 谁能帮助我,如果您需要任何其他信息,请告诉我。
【问题讨论】: