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 sendername@gmail.com to receivername@gmail.com.
For this
- we need to have the login credential for sendername@gmail.com email account.
- Need to set Apache Nifi running.
Steps:
- 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.



