Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

160
Vistas
mailto link using computed property not loading full message body

The mailto link is properly loading the recipients and subject but it seems to cut off the email body as a very short length. My email is a total of 1500 characters, so I am below the mailto limit. The email seems to be cutting off the body around 200 characters.

I am attaching a computed property to the mailto string because I am using a package called "marked.js" which parses user input to markdown/html.

How do I go about fixing this issue? I have tried setting a new data property as "emailFormat" and on page mount the email body is run through the marked package and then set as a data property. I assumed this would fix the issue because now I am just attaching a string to the mailto body, but this has not worked and i still end up with an incomplete email body.

computed property that takes in the api response data and runs through the marked package

letterContentToHtml() {
                if (this.formData.letterContent != null) {
                    return marked(this.formData.letterContent); // marked is package to parse user input to markdown/html. 
                }
                else {
                    return null;
                }
            },

template section that displays the content and a button that includes the mailto href

<p class="email-content-data" v-html="letterContentToHtml"></p>
<v-btn class="send-form-btn"
            :disabled="!campaignFormValid || this.emailRecepients == ''"
            elevation="12"
            color="primary"
            target="_blank" 
            :href="mailToString"
            @click="updateCampaignList">
                Send Email!
        </v-btn>

mailto computed property

mailToString() {
                return "mailto:"+this.formData.emailList+"?subject="+this.formData.subject+"&body="+this.emailContent;
            },

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You must URL-encode your data before assigning it to the HREF property of a hyperlink/anchor tag:

mailToString()
{
  return "mailto:" + encodeURIComponent(this.formData.emailList) + "?subject=" + encodeURIComponent(this.formData.subject) + "&body=" + encodeURIComponent(this.emailContent);
},

Otherwise it might interfer with some reserved characters, e.g. ? or = or & or some Unicode character.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda