如何在邮件正文中包含 href 标签?
how to include a href tag in mail body?
我正在使用 grails 邮件插件发送电子邮件,如下所示。我怎样才能在正文中包含 link?
mailService.sendMail{
delegate.to em
delegate.subject params['subject']
delegate.body "${params['body']} \n\nPlease click <a href='${l}'> Unsubscribe </a> to unsubscribe from the list."
}
在收到的电子邮件中,它被接收为
Please click <a href='https://ne-palmr.com/road/subscriptionCancellation/cancelSubscription?email=test%40gmail.com&from=979&t=d4007eb1ec361d8c3ec82f9525af2d08'> Unsubscribe </a> to unsubscribe from the list.
而预期结果是
Please click Unsubscribe to unsubscribe from the list.
将在此处复制 Slack 答案:您需要将 body
更改为 html
。
此外,您不需要在方法
之前使用 delegate
我正在使用 grails 邮件插件发送电子邮件,如下所示。我怎样才能在正文中包含 link?
mailService.sendMail{
delegate.to em
delegate.subject params['subject']
delegate.body "${params['body']} \n\nPlease click <a href='${l}'> Unsubscribe </a> to unsubscribe from the list."
}
在收到的电子邮件中,它被接收为
Please click <a href='https://ne-palmr.com/road/subscriptionCancellation/cancelSubscription?email=test%40gmail.com&from=979&t=d4007eb1ec361d8c3ec82f9525af2d08'> Unsubscribe </a> to unsubscribe from the list.
而预期结果是
Please click Unsubscribe to unsubscribe from the list.
将在此处复制 Slack 答案:您需要将 body
更改为 html
。
此外,您不需要在方法
delegate