Sending mails without opening the app

I need to send emails in the background with user’s location (I’m using the Background Geolocation plugin). I’ve made a simple server in node.js and it’s working fine but I need to get it directly without an email. Is it possible to do something like that using only Ionic2 framework? I know that Google is providing their Gmail API but there is only node.js and javascript version.

What does that mean?

In general Ionic apps can’t send email.
Ionic apps can connect to some backend server or service that sends email.

1 Like

I meant clicking the button (for example) and sending precomposed mail to the destination address without opening the mail app. I’ve done something like this with sending the message http POST request to my node.js server and then sending the email with Sendgrid. Is there any way to use gmail in the same way? Maybe I can use Google API to do it? Can you name the services I can use?

Sounds absolutely horrible to me if my location just get’s send over the air through a background geolocation call to be honest :smile:. You should dug into the Google API if this could be done through Gmail, but I do hope they’ve prevented it actually. If you really need to build something like this, I would go with the post to server and then send email option.

1 Like

The app purpose is not spying on people but displaying their location and ETA on the screen, for example, when they left their office. The user could stop and start the location in any moment, but behaviour of this app is not the point. I need automatic mail sending without external server because parsing data from mail is ok for me.

That was my personal opinion on the matter off course :wink: As regarding to Ionic and sending mail, it’s not something provided out of the box. If you find another way to automatically send mail I would very much like to know how you did that, other then pushing it through your server. Good luck!

1 Like

Did you get any solution… Same problem for me…automatic send mail with location when user login without any server…is it possible…

Didn’t find any solution so I used server and HTTP request.

1 Like

Have you used aws services with this scenario

i need to send mail using ionic 3 without opening the email app
i don’t need location
can u suggest how to do that ??

The only right way to trigger email is by using a mailserver. You can take a look at Mailjet, Mailgun or Mailchimp for examples. They provide you the tools and an API to create transactions and/or automations depending on your specific needs.

thanks a lot for helping
i will go for that