# Vue.js

Vue.js (opens new window) is a progressive framework for building user interfaces. And we are going to show how to use EmailJS SDK to send emails from Vue.js.

Below we will build the contact form component, ContactUs.vue:

  <form class="contact-form" @submit.prevent="sendEmail">
    <input type="text" name="user_name">
    <input type="email" name="user_email">
    <textarea name="message"></textarea>
    <input type="submit" value="Send">

import emailjs from 'emailjs-com';

export default {
  methods: {
    sendEmail: (e) => {
      emailjs.sendForm('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', e.target, 'YOUR_USER_ID')
        .then((result) => {
            console.log('SUCCESS!', result.status, result.text);
        }, (error) => {
            console.log('FAILED...', error);