Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Send email without popup?
Started by kcdev Feb 05 2019 03:11 AM

3 replies to this topic
email native

Best Answer Rob Miracle , 05 February 2019 - 10:35 AM

For security reasons, Apple and Android are going to want you to use a device control to do this like the popup you're talking about. However, neither prevent you from having a web server with a script that you can post an email address, subject, and body too and have the web server be responsible for sending the message. You could optionally use Socket IO and open your own port to an SMTP server under your control, but that gets really tough because you're going to have to learn encryption, authentication on top of socket IO to make it that way.

 

Rob

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

kcdev

[GLOBAL: userInfoPane.html]
kcdev
  • Contributor

  • 115 posts
  • Corona SDK

Hi Corona community,

Is there a way to send email from within my app outside of tapping the "send" button in native.showPopup("mail")?

I would like to do this as I want to display a custom dialog to compose email.

Thanks in advance!



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

  Best Answer

For security reasons, Apple and Android are going to want you to use a device control to do this like the popup you're talking about. However, neither prevent you from having a web server with a script that you can post an email address, subject, and body too and have the web server be responsible for sending the message. You could optionally use Socket IO and open your own port to an SMTP server under your control, but that gets really tough because you're going to have to learn encryption, authentication on top of socket IO to make it that way.

 

Rob



[TOPIC: post.html]
#3

kcdev

[GLOBAL: userInfoPane.html]
kcdev
  • Contributor

  • 115 posts
  • Corona SDK

Rob Miracle,

Thank you for your detailed response!

Using Socket IO and SMTP servers seems awfully complicated :(

The custom email dialog would have been a nice feature, but is not an integral part of my app. I think I will pass on it for now. It's just not worth it.

Thanks again for your reply.



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

You have to be careful when setting up email services because spammers are relentless and love hacking web scripts, then your server sends too much email (or you have a very successful app that sends a lot of emails) and your server may get blacklisted and you can't send mail.

 

If you're successful, you have to get good at using services like SendGrid to handle large volumes of mail.

 

There was an old adage in the Linux/Unix system admin world, if you knew "Sendmail", you would never admit you knew it because it would take over your life. 

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: email, native