What are mailto parameters for and how to use them?

Asked

Viewed 269 times

1

I know the key word mailto: used in attribute href in the link is used to open the user’s email client for sending the email, but did not know that there were some extra parameters, which can be used along with the keyword mailto:, these are:

  • cc
  • bcc
  • subject
  • body
  • ?
  • &
  • %20

What are they for and how to use them?

  • 1

    I can already say that the two penultimate ones are not "parameters" - they are only parts of the URL. The latter, a space in encoded URL. The others seem to be self-explanatory...

1 answer

0


"mailto:[...]" as you said, it is only a way to open the email client, and you can specify the following parameters:

mailto:[email protected] - specifies the e-mail destination

Subject - specifies the "subject" field of the email

body - specifies the main field of the email, is where you write your message

CC - Send a copy of the email to all specified email addresses

BCC - send a copy of the email to all these email recipients but without notifying the original destination of the message, it’s like you send a message on Whatsapp to X person, print the conversation, and send the print to people A, B, C, etc. People A, B, C will have a copy of the conversation without the person X knowing

? - this is to separate the domain used by "mailto" from the URL parameters, for example: https://qualquerdominio.com/uma-rota?parametro=valorDoParametro

& - This is to specify a second or third, or fourth parameter, for example: https://qualquerdominio.com/umaRotaQualquer?parametro=valorDoParametro&outroParametro=valorDoOutroParametro

%20 is used instead of using a space, say I want to send a message with the subject "Good morning", rather than leaving this blank in the URL: "https://domioqualquer.com/umaRotaQualquer?subject=bom day", the URL is invalid, you need to replace the white space with %20, and then stay that way: "https://domioqualquer.com/umaRotaQualquer?subject=bom%20dia"

I hope you understand, any questions you may have, just ask :D

  • 1

    Thank you so much! I understand now.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.