Advertisement
fabiobiondi

Untitled

Dec 27th, 2021
1,393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. event.preventDefault();
  2.         const data = {
  3.             service_id: 'xx',
  4.             template_id: 'xxx',
  5.             user_id: 'xxx',
  6.             template_params: {
  7.                 'from_name': formData.username,
  8.                 'subject': 'richiesta info da sito web',
  9.                 'message_html': `
  10.  
  11.                     Ciao, ti scrivo per ricevere informazioni.
  12.                     Mi chiamo ${formData.username}
  13.  
  14.                     Phone: ${formData.phone}
  15.                     Email: ${formData.email}
  16.  
  17.                 `
  18.             }
  19.         }
  20.         axios.post('https://api.emailjs.com/api/v1.0/email/send', data)
  21.             .then(res => {
  22.                 console.log('EMAIL INVIATA', res)
  23.             })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement