This is a migrated thread and some comments may be shown as answers.

How to send an email from app?

5 Answers 197 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Marcus
Top achievements
Rank 1
Marcus asked on 16 Jan 2013, 06:27 PM
Is there a way to send an email/pop open the default email app from an Icenium app?  

I tried the window.location = 'mailto:test@test.test?body=Hello World'; method, but it doesn't seem to open the default email application (I also don't know if it will work on iPhone).

I know there are some plugins that allow this, but we can't add in plugins yet.

Does anybody know of a way to do this?

5 Answers, 1 is accepted

Sort by
0
Kristian D. Dimitrov
Telerik team
answered on 17 Jan 2013, 02:08 PM
Hi Marcus,

 You don't have to use a plugin to call the native e-mail app. You can try using window.location.href = "mailto:test@test.com?subject=test"; . I tested it on iPhone5 with iOS 6.0.1, HTC EVO 3D with Android 4.0.1 and Samsung Galaxy 2 with Android 2.3.3.

Regards,
kdimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Marcus
Top achievements
Rank 1
answered on 17 Jan 2013, 04:03 PM
That's what I tried. However, it opened up the "Email" app, which said I didn't have any accounts then immediately closed. I want it to open the "GMail" app instead. So I'm assuming there's no way to pick which email app it opens?
0
Kristian D. Dimitrov
Telerik team
answered on 18 Jan 2013, 03:17 PM
Hello Marcus,

Unfortunately, when you use "mailto:" the default email application for the device is opened.

Kind regards,
kdimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Craig
Top achievements
Rank 1
answered on 05 May 2015, 04:08 PM

Hi,

Created a simple app with a contact page for my Android app. When I test the app on the simulator to send emails it opens the desktops mail account. However on my device nothing happens.

 <a data-role="button" id="myElement" data-rel="external" href="mailto:support@example.com">Contact us</a>

 Any ideas what I am missing?

 

Thanks

0
Zdravko
Telerik team
answered on 08 May 2015, 10:41 AM
Hi Craig,

Since Cordova 3.7, where security fixes were applied, you will have to whitelist any non http/s protocols in the config.xml in order to use them again.
In your case you need to add the mailto protocol:
<access origin="mailto:*" launch-external="yes"/>

If you still have troubles and this is not your case, consider opening a private ticket where to provide a sample isolating your case.

Regards,
Zdravko
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
Marcus
Top achievements
Rank 1
Answers by
Kristian D. Dimitrov
Telerik team
Marcus
Top achievements
Rank 1
Craig
Top achievements
Rank 1
Zdravko
Telerik team
Share this question
or