<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: ektaarora3501</title>
    <description>The latest articles on Forem by ektaarora3501 (@ektaarora3501).</description>
    <link>https://forem.com/ektaarora3501</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F173520%2F5e665340-9b8f-48b8-87dd-6a00fbd8ebee.jpeg</url>
      <title>Forem: ektaarora3501</title>
      <link>https://forem.com/ektaarora3501</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ektaarora3501"/>
    <language>en</language>
    <item>
      <title>Integrating EmailJs with ReactJs</title>
      <dc:creator>ektaarora3501</dc:creator>
      <pubDate>Sun, 12 Jul 2020 13:50:29 +0000</pubDate>
      <link>https://forem.com/ektaarora3501/integrating-emailjs-with-reactjs-3dok</link>
      <guid>https://forem.com/ektaarora3501/integrating-emailjs-with-reactjs-3dok</guid>
      <description>&lt;p&gt;Almost all the web applications we create, we need to send emails to users, whether it be a support email or verification one. In the below article we will go through all the steps of sending emails directly with ReactJs.&lt;br&gt;
All we need is a basic knowledge of React and EmailJs account.&lt;/p&gt;

&lt;p&gt;So developers fasten up your seat belt! Here we go !! 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Creating EmailJs account&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the link and create a free account on EmailJs&lt;/li&gt;
&lt;li&gt;Select the service  you want to start with. I am using Gmail Service.&lt;/li&gt;
&lt;li&gt;Connect your account and click on add service.&lt;/li&gt;
&lt;li&gt;You will see Gmail service in added services .&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Creating mail template&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In your EmailJs dashboard click on Email Templates -&amp;gt; Create New template. Setup your template name and id.&lt;/li&gt;
&lt;li&gt;You can configure the template as per your requirement.&lt;/li&gt;
&lt;li&gt;You can use curly braces for the fields that will receive data from react code as shown below. I have made "To email" field dynamic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OFtmtrby--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xam4v2zljhz1ve9a2gyo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OFtmtrby--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xam4v2zljhz1ve9a2gyo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Woo! Our template is set 🎉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Time for some code .. 😎&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new React App&lt;/li&gt;
&lt;li&gt;Install the EmailJs package using command 
&lt;code&gt;$ npm install emailjs-com --save&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Import Email js in your App.js file
&lt;code&gt;import * as emailjs from "emailjs-com";&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Grab the service Id and template id from your template-&amp;gt; Copy Code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mITO8faJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/62g133wprtdcgk3s5hk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mITO8faJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/62g133wprtdcgk3s5hk0.png" alt="id"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy your user id from Account-&amp;gt; API Keys -&amp;gt; User ID&lt;/li&gt;
&lt;li&gt;Modify your App.js file &lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create the handleChange function &lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;And you are done!!!&lt;br&gt;
Woo! now you can send emails directly from react . 🎉&lt;/p&gt;

&lt;p&gt;You can find the complete code on my github repository &lt;a href="https://github.com/ektaarora3501/React-Emailjs"&gt;React-Emailjs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>emailjs</category>
      <category>emails</category>
    </item>
  </channel>
</rss>
