我如何使用节点和包含 link 的 sendgrid 发送电子邮件?

how can i send an email using node and sendgrid including a link?

我目前正在尝试在节点应用程序中使用 sendgrid 来发送一封电子邮件,其中包含用于电子邮件确认的 link。我完全不确定如何实现这一点,文档也没有帮助。如果有人知道如何执行此操作,请提供建议。 当前代码:

const msg = {
      to: userObj.username,
      from: "email",
      subject: "dashboard account",
      text: `Hello, you have successfully created an account for the Dashboard`,
      html: "<a href='localhost:1337/'>Confirm Email<a/>"
    };
sgMail.send(msg).catch(err => console.log(err));

邮件发送正确,但只包含 "Confirm Email" 字样,没有 link.

这样试试:

html: `<a href='https://github.com/zishon89us/node-cheat/blob/master/send_emails/send_grid.js#L40'>This is Link<a/>`