Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jorge_F_1
Beginner
116 Views

Send email with INTEL XDK

I'm from Brazil. Help me. I'm trying to email the Intel XDK and not be working. It does not send, no effect. The version of my Intel XDK 3357.
The cord-email-composer plugin is installed on my project. I am using the Bootstrap framework.

In the first example, I use intel.xdk.device.sendEmail and second, use the cordova.plugins.email.open. WHERE I AM missing?

I've done two code:
First example:

<body>
<input type="button" onclick="enviar3()" value="Exibir Alert" />
</body>

<head> 
<script type="text/javascript">
function enviar3()
{
alert("sss"); 
        intel.xdk.device.sendEmail("yyyyy", 
        "ajjaf77@gmail.com",    
        "teste",  // The subject
        true,                           // Is Html
        "",                             // CCed
        ""                              // BCCed
)};
</script>


Segundo exemplo:

<script>
    cordova.plugins.email.open({
    to:      'ajjaf77@gmail.com',
    cc:      'ajjaf@bol.com.br',
    subject: 'Greetings',
    body:    'How are you? Nice greetings from Leipzig'
});
</script> 

Tags (2)
0 Kudos
7 Replies
Zhen_Z_Intel
Employee
116 Views

Hi, I am afraid there is no intel XDK plugins for send email. Please refer the cordova-plugin-email-composer and follow the document to program your code. Hope it helps you.

Jorge_F_1
Beginner
116 Views

Thank you for your help.
Note that I used the example of cord-plugins-mail, but also failed. In my project, I acidionei the composer email, version 0.8.3, and does not produce any effect, ie not resolved.
 
<script>
cordova.plugins.email.open({
    to:      'ajjaf@bol.com.br',
    subject: 'Teste de e-mail - android',
    body:   '<h1>prova</h1>',
    isHtml:  true
    alert("ok5");
});
</script>
 
I have to add something in my HTML? can you send me a complete index.html, including this plugin? thank you.
Zhen_Z_Intel
Employee
116 Views

Here is an example you can access, please notice you have to call "deviceready" event in Cordova application to signal that the plugin is ready to access. And then, check is you have an account through using "cordova.plugins.email.isAvailable" function. After that, you can trigger "email.open" function sending email. Hope it helps you.

Jorge_F_1
Beginner
116 Views

Thanks for your response. I am new to Intel XDK. I did not quite understand your explanation. Please and please ask, put example html or javascript "deviceready" and "cordova.plugins.email.isAvailable". Thank you.

Jorge_F_1
Beginner
116 Views

My friend,

I did as you directed me, but did not send the email. Where am I going wrong? thank you.

 

<script>

    document.addEventListener('deviceready', function () {
    // cordova.plugins.email is now available
}, false);

cordova.plugins.email.isAvailable(
    function (isAvailable) {
    // alert('Service is not available') unless isAvailable;
    }
);
</script>
    
<script type="text/javascript">
cordova.plugins.email.open({
    to:      'ajjaf@bol.com.br',
    cc:      'ajjaf77@gmail.com',
    bcc:     ['ajjaf@bol.com.br', 'ajjaf77@gmail.com'],
    subject: 'Greetings',
    body:    'How are you? Nice greetings from Leipzig'
});
</script>

Jorge_F_1
Beginner
116 Views

Already I rummaged through a lot, trying to find a solution for email sent from an application developed in Intel XDK, but unfortunately did not find any. My suggestion in this forum would suggest, ask to develop a step-by-step, if possible with video of an example showing how this could be done. I'm already in version 3400 Intel XDK, does not work or how to pray.

Ronaldo_M_
Beginner
116 Views

After suffering a bit I discovered that version 0.8.3 (last) of this katzer cordova-email-composer plugin does not work on android. I achieved success using version 0.8.2, also of katzer. Enter github at https://github.com/katzer/cordova-plugin-email-composer/tree/0.8.2, if it does not install directly in the XDK (or other IDE), download and install it locally.

Reply