#1 2015-05-29 22:26:56

Registered: 2015-04-21
Posts: 64

send a email?

Hello David,
next issue, next question... Sorry for all this hustle, but there is too much too new for me ... How would you send a email to yxz with content you got out of different input controls? I read a lot about mailto, but as far as I understand I need for example a php script to do this?


#2 2015-05-29 22:42:59

From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,717

Re: send a email?

Hello Walter,

There is not a native way to do it in Javascript, therefore you need to connect to some server (your app server or another) in order to really send the email. Searching a bit around we can found various providers which allow us to send mail from Javascript, but they finally need an HTTP post request in order to send the mail. Of course a PHP script can do the job by making an HTTP post request to such script. The "mail" PHP function can send a mail directly and we can use an App Builder HTTP client control to make the HTTP post.

If you use "mailto" they never send the email directly, but offers the user the hability to send it from their predefined program. On the other hand, how we can use the "mailto" exactly? Probably we need a pure "A" HTML tag link (using the HTML content control at this time). What you can try it's to prepare the URL using the "Value" variables of the controls contents you want to send. Maybe App Builder must implement a couple of actions to encode and decode URI's, but I am not sure if we need it to use the "mailto".

Maybe the "OpenWindow" action can do the job for the "mailto" if we provide a "mailto" URL instead of another URL. Probably they works in browsers, but I don't know if they works in a similar way in Android, for example. Remember also that App Builder include various samples related with HTTP requests. "SimplePost", "HttpClient" and others show us how we can made HTTP post request very easily.


Board footer

Powered by FluxBB

Copyright ©2018 DecSoft. All rights reserved.