Software Archive
Read-only legacy content
17061 討論

Send e-mail

Leonardo_M_3
初學者
972 檢視

Hello everyone , i have a problem with XDK.I'm trying to send an email but i don't know what is wrong. My code:

<script type="text/javascript">
            function notEmpty(){
                var myTextField = document.getElementById('Name').value,document.getElementById('Mail').value;
                if(myTextField.value != "")
                intel.xdk.device.sendEmail (myTextField.value, 'mail@mail.comr', 'Contact', true, null, null)
                else
                alert("Would you please enter some text?") 
               }
        </script>

 

 

<input class="wide-control" placeholder="Placeholder Text" type="text" id="Nome">
                </div>
                <div class="table-thing with-label widget uib_w_2 d-margins" data-uib="app_framework/input" data-ver="1">
                    <label class="narrow-control label-inline" for="Mail">Input</label>

                    <input class="wide-control" placeholder="Placeholder Text" type="text" id="Mail">
                </div><a class="button widget uib_w_3 d-margins" data-uib="app_framework/button" data-ver="1">Button</a>
                <button onclick="notEmpty()">Click me</button>

0 積分
6 回應
Amrita_C_Intel
972 檢視

Hello,

Refer this plugin https://github.com/katzer/cordova-plugin-email-composer 

which might help

Anusha_M_Intel1
972 檢視

The Intel XDK plugins are no longer maintained and so we highly recommended our users switch over to their Cordova equivalents. 

You might also want to read up on this if you want to launch email externally - https://software.intel.com/en-us/xdk/articles/cordova-cli-412-domain-whitelisting-with-intel-xdk-for-ajax-and-launching-external-apps

 

Daniele_A_
初學者
972 檢視

^ up ^

Need to send email .. and i add this plugin https://www.npmjs.com/package/cordova-plugin-email-composer

write this code to launch send email...window..

         
    cordova.plugins.email.open({
    to:      'danielea771@gmail.com',
    subject: 'Richiesta Farmaco',
    body:   '<h1>prova</h1>',
    isHtml:  true
});

But nothing happens... xdk block plugin in device?

Please Let me understand...how to add this under whitelist...

 

Daniele_A_
初學者
972 檢視

hi developer ... please let me to understand to add in whitelist this plugin email.composer

cordova-plugin-email-composer version 0.8.3... seems device block it...

i use this ..code...           
    cordova.plugins.email.open({
    to:      'danielea771@gmail.com',
    subject: 'Richiesta Farmaco',
    body:   '<h1>prova</h1>',
    isHtml:  true
});

but i can't see any window in device... to send.. email!

 

 

Silviu_I_
初學者
972 檢視

You may need the InAppBrowser plugin as well to get that one to work.

PaulF_IntelCorp
972 檢視

Daniele -- you cannot debug third-party plugins in the Emulate tab. You need to use an Android device with the Debug tab or build your app and test on device. The Emulate tab only supports the core Cordova plugins.

回覆