In this post, we will see how one can send email to others using processors provided by Apache Nifi.
Assume, we want to send email from firstname.lastname@example.org to email@example.com.
- we need to have the login credential for firstname.lastname@example.org email account.
- Need to set Apache Nifi running.
- Access Nifi user interface.
- Bring GnerateFlowFile processor into the canvas
- Configure GnerateFlowFile processor as shown in below figure.
|Figure : Configuration of GenerateFlowFile processor|
- Now bring PutMail processor into the canvas
- Configure PutMail processor as shown in below figure.
|Figure : Configuration of PutMail processor|
- Connect GnerateFlowFile to PutMail processor as shown below.
- Now configure your gmail account and allow Nifi to login and send emails on your behalf.
- For above, Sign in to your Gmail account
- Now visit below link: https://myaccount.google.com/security?rapt=AEjHL4MPOlIXcaCs-jP2OdP7-Sg31QTMNhC7WbO6I08_VwUe2u5--dz6TedtBcYIYo0Ch2IfRYqErD677n9CCBrPnYgRnHcpXw
- Make sure that Less secure app access is ON as shown in below:
- Now start above processors and you should be receiving the dummy emails.
- That's all, comment if you face any difficulties.