Software Archive
Read-only legacy content

Send e-mail

Leonardo_M_3
Beginner
445 Views

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 Kudos
6 Replies
Amrita_C_Intel
Employee
445 Views

Hello,

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

which might help

0 Kudos
Anusha_M_Intel1
Employee
445 Views

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 Kudos
Daniele_A_
Beginner
445 Views

^ 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 Kudos
Daniele_A_
Beginner
445 Views

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 Kudos
Silviu_I_
Beginner
445 Views

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

0 Kudos
PaulF_IntelCorp
Employee
445 Views

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 Kudos
Reply