Page 1 of 3

Click an Email from a database and open in the Phones email service?

Posted: Thu Oct 30, 2014 11:33 pm
by Hannah

How can I click an email and open the phones email program and send an email to that email and some thing for clicking a phone number and opening that phone number in the phones dialer? These emails and phone number will be coming out of a data base. Is there a tutorial that will walk you though it?


Click an Email from a database and open in the Phones email service?

Posted: Fri Oct 31, 2014 3:15 am
by Yurii Orishchuk

Hi Hannah,

Please take a look here: https://getsatisfaction.com/apperyio/...

Regards.


Click an Email from a database and open in the Phones email service?

Posted: Fri Oct 31, 2014 3:20 pm
by Hannah

In the coding from that link they have a preset email address. I have a database that I would be pulling the emails from. How would I do that?


Click an Email from a database and open in the Phones email service?

Posted: Sat Nov 01, 2014 8:23 am
by Alena Prykhodko

Click an Email from a database and open in the Phones email service?

Posted: Mon Nov 03, 2014 1:43 pm
by Hannah

I thought that these services were for working with Databases. I already have the database showing. What I need to do now is be able to click an email and open the phones email program and send an email to that specific email that was clicked and same with phone numbers. I have tried the following code for emails (That I got from the first reply, but this is for sending to a preset email address every time):

var link = "mailto:a href="mailto:feedback@example.com" rel="nofollow"feedback@example.com/a?subject="+Appery('feedbackSubject').val()+"&body="+Appery('feedbackMessage').val();
alert(link);
window.open(link);

and it does open the email but it does not select the email address that has been selected. What would I need to put in after the "mailto" to be able to pull that specific email address?


Click an Email from a database and open in the Phones email service?

Posted: Mon Nov 03, 2014 5:47 pm
by Maryna Brodina

Hello!

You can form mailto from input component with inputName name. For example this way prevar link = "mailto:" + Apperyio("inputName");/pre


Click an Email from a database and open in the Phones email service?

Posted: Mon Nov 03, 2014 8:01 pm
by Hannah

I have tried this code and it's still not working the email will not open.

While looking though other forums I have added "window.open(link);" and now the code i'm using is this:
var link = "mailto:" + Apperyio("imputName");
window.open(link);

It does open the email program in the phone but it doesn't put the specific email address in. Where the email address is supposed to be it has [object Object] and also opens a web page.


Click an Email from a database and open in the Phones email service?

Posted: Tue Nov 04, 2014 5:12 am
by Yurii Orishchuk

Hi Hannah,

Sorry there was a typo.

Please try this code:

pre

//Where "inputName" is input component name.
var link = "mailto:" + Apperyio("inputName").val();

/pre

Regards.


Click an Email from a database and open in the Phones email service?

Posted: Tue Nov 04, 2014 6:42 pm
by Hannah

That still didn't work.

But I did get it to work using this code and saving the value to local storage first.

var link = "mailto:" + localStorage.getItem("imputName");
window.open(link);

and it does still open a blank web page, but that is better then it not working at all.

So I can use this same concept for making phone calls right?

Save the value to local storage first and then use this code:

window.location.href = "tel:" + localStroage.getItem("imputName"); << for androids
window.open('tel:' + localStorage.getItem("Phone"), 'system'); << for iphones

I was thinking that this would work but when I test the phone in the Appery Tester on the phone it does not open the dialer in the phone.

Is there a part of the code that I am missing?


Click an Email from a database and open in the Phones email service?

Posted: Wed Nov 05, 2014 10:35 am
by Evgene Karachevtsev