Search code examples
angulartypescriptionic-frameworkhybrid-mobile-app

Send email in background without server on mobile app


so I am building a mobile app with Ionic at the moment. I would like to send an email to admins when a post is reported in the app. I don't want to send it with EmailComposer as the user would see the email contents for admins. Sending via PHPMailer is also not possible as I don't have a server available for this project.

Do you have any suggestions for how to implement this? Please help me! Thank you!

I've tried to find a way for using EmailComposer and PhpMailer. But under the circumstances statet above none of them could give me satisfying results.

I would like to receive an email with the reported posting the corresponding user id & post id plus the user id of the user who reported the posting.


Solution

  • I would suggest you use a solution like Google Firebase (free unless you have A LOT of usage) which integrates perfectly with Ionic.

    Have a look at this documentation: https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users

    In my case, even for the simpliest app, the first step when working on a new app is to create a Firebase project for that app. Setup is done in a few minutes and you get a lot of features like user authentication, database, push notifications, cloud functions (which you can use to mail things), etc...