问题描述
我正在尝试通过SendGrid发送邮件,我以前从未使用过邮件服务。这是第一次使用它。
在您的应用内
const sgMail = require("@sendgrid/mail");
sgMail.setApiKey(
"*******************" // API KEY
);
const msg = {
to: "sp@gmail.com",from: "Berryy@gmail.com",subject: "Sending with sendgrid from testing site",text: "weofaowefnaowefinawefo",html: `<a> https//www.google.com </a>`,};
try {
sgMail.send(msg);
} catch {
console.log('err sending mail')
}
如您所见,我正在发送一个链接,该链接指向带有标签的google。 因此,由于我正在HTML标记内编写代码。它应该向右发送链接,但他们向我发送了字符串。 SendGrid不支持链接吗?
解决方法
您没有提供参考。
<a href="https://www.google.com" > https://www.google.com </a>