Search code examples
flutteremailpasswordssendgridflutter-web

Email in Flutter Web without using password or any sensitive data


I want to send an email using Flutter Web without using a password or any sensitive data as I have hosted my webpage using GitHub Pages and I want it to be open source. Also, using direct passwords in code may lead to data leaks. Any ideas what should I do? As if I use things like 'SendGrid then in that case the API needs to be a secret. I need emails for notification to myself, so even a special case will work for me.


Solution

  • I didn't find a generalized answer to it. But if you want a special case and need emails for notification to just yourself then in that case you can use EmailJS. It is a client-side service and you can set a template for your use.

    You may refer to this video - https://www.youtube.com/watch?v=RDwst9icjAY

    But you need to make sure that 'to_parameter' is fixed. So that it is safe. I will update this answer if I find an alternative method.