email without native.showPopup

Is there any way to send an email without the aplicacióm mail is opened on the device?

You would either need to use a web service that let you use network.requests() and provide the necessary information to it and have the server send the message, or you can write some low level socket code to open up an SMTP port and transmit your mail that way, though open SMTP gateways tend to get black listed because spammers make use of them… That is you likely will need to login to the SMTP server with a username and password that server knows about.

Rob

Hello, Rob. Thanks for answering. I have this doubt: Can not send e-mail bypassing the Apple app?

How do I send data from one device to another, for example to update weather data that generated autonomously in a weather station? I take the data manually with a device, the I incorporate my mother application and send to all users who purchased the child application.

@fferraro67,

Rob actually answered that first question, No you cannot send emails, except by:

  1. Using native.showPopup(), OR

  2. Roll-Your-Own email client and use network.request()

Regarding the new question/example: Sending data from a ‘parent’ app to a ‘child’ app.  You can do a few things:

  1. If the devices are on the same WiFi. Simply use TCP or UDP  (see this free library: http://www.mydevelopersgames.com/AutoLAN/))
  2. If the devices are separated geographically, use a master server to connect them.  For this, you’ll have to use something like Coronium to act as the master.
  3. Alternately, if they are separated geographically, you can use a separate server to store data.  Then, one device (or) more can send data to the server for storage/holding.  Other ‘child’ devices/apps can connect to the server and download the data at their leisure.

Finally, I don’t know why you want to skip the e-mail client, but if you decide you can put up with it, there is a wonderful (iOS ONLY) feature whereby you can have an attachment launch your app.  i.e. You have to people with the same app.  One e-mails the other a special attachment.  When the 2nd person clicks the attachment it launches the app and ‘sucks in’ the data (you must code this).  

http://coronalabs.com/blog/2013/02/05/ios-tutorial-using-email-attachments/

I appreciate your time and effort to answer. I am very grateful. Not that I want to use the mail, so I do not want is to launch the iPad native app, I want the email to be sent without opening a second application. Below that you do not open anything.

I appreciate your time and effort to answer. I am very grateful. Not that I want to use the mail, so I do not want is to launch the iPad native app, I want the email to be sent without opening a second application. Below that you do not open anything.

Hi again.

It occurred to me that the real problem you’re trying to solve is sending emails via Lua, or rather you want an example of how to send an e-mail using Lua and thus bypassing the the native.showPopup() call.

I did a quick google search ‘send email lua’ and found some possible answers (not sure if they will work yet as I am offline):

If your goal is to collect data from one device and share with other devices, then perhaps email is not the best way to approach this.  You would be better off using a service like Coronium or Parse to allow your sending device to report the data to the server.  Then your other apps can pull the data as necessary.  E-Mail is not the route to go for something like this.

Rob

You would either need to use a web service that let you use network.requests() and provide the necessary information to it and have the server send the message, or you can write some low level socket code to open up an SMTP port and transmit your mail that way, though open SMTP gateways tend to get black listed because spammers make use of them… That is you likely will need to login to the SMTP server with a username and password that server knows about.

Rob

Hello, Rob. Thanks for answering. I have this doubt: Can not send e-mail bypassing the Apple app?

How do I send data from one device to another, for example to update weather data that generated autonomously in a weather station? I take the data manually with a device, the I incorporate my mother application and send to all users who purchased the child application.

@fferraro67,

Rob actually answered that first question, No you cannot send emails, except by:

  1. Using native.showPopup(), OR

  2. Roll-Your-Own email client and use network.request()

Regarding the new question/example: Sending data from a ‘parent’ app to a ‘child’ app.  You can do a few things:

  1. If the devices are on the same WiFi. Simply use TCP or UDP  (see this free library: http://www.mydevelopersgames.com/AutoLAN/))
  2. If the devices are separated geographically, use a master server to connect them.  For this, you’ll have to use something like Coronium to act as the master.
  3. Alternately, if they are separated geographically, you can use a separate server to store data.  Then, one device (or) more can send data to the server for storage/holding.  Other ‘child’ devices/apps can connect to the server and download the data at their leisure.

Finally, I don’t know why you want to skip the e-mail client, but if you decide you can put up with it, there is a wonderful (iOS ONLY) feature whereby you can have an attachment launch your app.  i.e. You have to people with the same app.  One e-mails the other a special attachment.  When the 2nd person clicks the attachment it launches the app and ‘sucks in’ the data (you must code this).  

http://coronalabs.com/blog/2013/02/05/ios-tutorial-using-email-attachments/

I appreciate your time and effort to answer. I am very grateful. Not that I want to use the mail, so I do not want is to launch the iPad native app, I want the email to be sent without opening a second application. Below that you do not open anything.

I appreciate your time and effort to answer. I am very grateful. Not that I want to use the mail, so I do not want is to launch the iPad native app, I want the email to be sent without opening a second application. Below that you do not open anything.

Hi again.

It occurred to me that the real problem you’re trying to solve is sending emails via Lua, or rather you want an example of how to send an e-mail using Lua and thus bypassing the the native.showPopup() call.

I did a quick google search ‘send email lua’ and found some possible answers (not sure if they will work yet as I am offline):

If your goal is to collect data from one device and share with other devices, then perhaps email is not the best way to approach this.  You would be better off using a service like Coronium or Parse to allow your sending device to report the data to the server.  Then your other apps can pull the data as necessary.  E-Mail is not the route to go for something like this.

Rob