1

I have a URL ready to be followed. I am sending an email using Google script, and in this email I need this link to be there but I do not want it to be:

http://example.com/this/is/very/ugly/when/it/comes/to/sending/emails

I would like it to be Example.

3

You need to send HTML email to do that.

In Google Apps Script you do that by specifying a htmlBody element to the MailApp.sendMessage method:

MailApp.sendEmail({
 to: "recipient@example.com",
 subject: "Your link",
 htmlBody: "Here is your example link: " +
           "<a href=\"http://example.com/this/is/very/ugly/when/it/comes/to/sending/emails\">Example</a>"
});

See the documentation for MailApp.sendEmail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.