Search code examples
htmlreactjsforms

How to send emails with smtpjs in reacts without typescript


I tried creating a contact form with SMTP js in react but it did not work tried checking stack over flow but no good answer for using only react not typescript

I was expecting the stmp is to be installed like normal swiper

Because I'm still a junior frontend dev 🤧


Solution

  • You can also find more information and documentation on using smtp.js in React app on the following resources:

    Official smtp.js documentation: https://github.com/kimmobrunfeldt/smtp.js SMTP in Node.js: https://nodemailer.com/smtp/

    this also explains better: https://victorbruce82.medium.com/how-to-send-emails-using-react-through-emailjs-no-server-code-needed-8e1453ef8796

    Yes, you can install smtp.js in a similar way to installing other packages in your React app. You can use npm or yarn to install it: CODE : npm install smtpjs or yarn add smtpjs

    After installation, you can import and use smtp.js in your React component.