Software Archive
Read-only legacy content

Send e-mail

Leonardo_M_3
初学者
1,131 次查看

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
1,131 次查看

Hello,

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

which might help

0 项奖励
Anusha_M_Intel1
1,131 次查看

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

 

0 项奖励
Daniele_A_
初学者
1,131 次查看

^ 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...

 

0 项奖励
Daniele_A_
初学者
1,131 次查看

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!

 

 

0 项奖励
Silviu_I_
初学者
1,131 次查看

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

0 项奖励
PaulF_IntelCorp
1,131 次查看

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.

0 项奖励
回复