How to send attachment using emailjs

Viewed 18

I'm using VueJS and emailjs to send mails to clients, but I want to attach files (specifically, PDF files) but it only sends content without attachments. My code:

    const myfile = window.btoa(this.fileCV)//retrieved from the event e.target.files[0];
            emailjs.send("service_bbo9xxx", "template_3gxxx", {
               from_name: "",
                to_name: "",
                message: `"Content"`,
                user_email:"trungsoobin10@gmail.com",
                content: myfile,
            });

I'm following the instructions on the Email.js docs however it's not working or I'm doing them wrong: enter image description here

What do I need to do in this case? Hope to get help from everyone

0 Answers
Related