You cannot make buttons but you make links with custom text using an HTML body. Notice that email HTML is more restrictive than regular HTML that you find in pages (which is a good thing for security reasons). Usually when you make an HTML body you also make a plain text version of it, so it’s easier to read on every device.
Here is an example using Google Apps Script MailApp
:
MailApp.sendEmail(
'to@something.com',
`Requested link`,
`Here is the requested link:
https://example.com/?ugly=true`,
{
htmlBody: `<a href="https://example.com/?ugly=true">Click here to go to the page</a>`
}
)
Notice that if you are mailing automatically you probably want to use bcc
instead of recipient
to prevent leaking emails to multiple people and set noReply
(if have a custom domain) if you don't want them to reply:
MailApp.sendEmail(
'',
`Requested link`,
`Here is the requested link:
https://example.com/?ugly=true`,
{
bcc: 'to@something.com',
htmlBody: `<a href="https://example.com/?ugly=true">Click here to go to the page</a>`,
noReply: true
}
)
References
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…