0

I am building a hybrid mobile application (HTML5, JS, jQuery, CSS3) and need to implement in-app email functionality with following features:

  1. Email feature to only send emails with predefined text and dynamically generated URLs (embedded within the email body)
  2. This email feature should not send email via default email clients (like Gmail for Android). Sender email/ account will be defaulted to a constant value; it will not be user dependent.
  3. Email to ask app-user to enter only the links which are to be send and the email-id of recipient (this feature is implemented as a form in the html page).

I have seen emailComposer However plugin. I am not sure if it routes the request via the default email client of your mobile. Please provide inputs on how to build this functionality.

teynon
  • 7,540
  • 10
  • 63
  • 106
  • Research and hard work. – teynon Dec 15 '15 at 05:55
  • I actually searched for the feature. However the references which I found mention that the device needs a mail client installed to send emails --> https://github.com/katzer/cordova-plugin-email-composer#examples – user3932624 Dec 15 '15 at 06:01
  • I say research and hard work because you've just asked Stack Overflow users to design your software for you. This question is far too broad for one specific answer. – teynon Dec 15 '15 at 06:03
  • 1
    I am not at all looking for a ready-made code. My searching through the internet did not help me find a solution for "_how to send emails from in-app feature without accessing default email applications like Gmail for Android_". So the max that I ask for is a reference (may be a blog) on how this can be achieved. Meanwhile I will also continue with my trials on how to do this. – user3932624 Dec 15 '15 at 06:11

1 Answers1

1

I could be wrong, but sending an email from a client using a pre-determined from is not likely something you'll be able to do. The reason I suspect this is because sending an email from a device to a mail server without the users direct interaction or personal email address opens the door for malicious applications to spam email servers with content. There may be a way to do it, but it would be much easier to send a request to a web server and have the web server send the email.

Stack Overflow questions seem to have possibly proven me wrong.

How to send email in background in Android ?

Community
  • 1
  • 1
teynon
  • 7,540
  • 10
  • 63
  • 106
  • The user can only mention Name, Email-Id and link (of an item which is in a backend server). He cannot add anything more than this. Pre-defined in my case means only the text like "_Mr. XYZ, As per your interest we are sending you list of documents: Link1, Link2. For further communication please contact someone@something.com_" – user3932624 Dec 15 '15 at 06:27
  • 1
    "but it would be much easier to send a request to a web server and have the web server send the email." --> This is a nice idea. – user3932624 Dec 15 '15 at 06:30