I’m working on a Flutter web application and need to implement email sending functionality directly from the client side without using a backend server. I don’t have a backend and would like to explore options within Flutter web itself.
I’ve looked into mailer library, but I’m unsure about the best way to achieve this without compromising security.
Specific Questions:
Is it possible to send emails directly from a Flutter web app without a backend?
Are there any Flutter packages or client-side libraries that support email sending for web applications?
Any guidance or code examples would be greatly appreciated. Thank you!
2
Answers
You will be unable to send directly from your mobile phone to any arbitrary mail server because of all the necessary spam blocking setups. You’ll have to go through a trusted relay of some kind. And to use the user’s mail credentials, the best you can do is open a ‘mailto’ URL.
So your choices are: use a mail service, or open a mailto. That’s about it.
I have not tested on web but it may works with the package url_launcher
You can try
On mobile side, it launches the default mail app but I don’t know what happens on web