- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi
I did good code to send email without any problem, but i have 3 input I want to display in body of email
how I can do to get it
my input Id is a, b, c
this my code
cordova.plugins.email.isAvailable( function (isAvailable) { // alert('Service is not available') unless isAvailable; } ); cordova.plugins.email.open({ to: 'a@a.com', subject: 'AAAAA', body: '<h1>Nice greetings from Leipzig</h1>', isHtml: true });
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case, using jQuery you can add the value of your 3 input elements as following:
cordova.plugins.email.open({ to: 'a@a.com', subject: 'AAAAA', body: '<h1>'+ $('#a').val() + $('#b').val() + $('#c').val() +'</h1>', isHtml: true });
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See the plugin doc page for an example > https://github.com/katzer/cordova-plugin-email-composer#open-a-pre-filled-email-draft
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case, using jQuery you can add the value of your 3 input elements as following:
cordova.plugins.email.open({ to: 'a@a.com', subject: 'AAAAA', body: '<h1>'+ $('#a').val() + $('#b').val() + $('#c').val() +'</h1>', isHtml: true });
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Elroy Ashtian Jr (Intel) wrote:
In this case, using jQuery you can add the value of your 3 input elements as following:
cordova.plugins.email.open({ to: 'a@a.com', subject: 'AAAAA', body: '<h1>'+ $('#a').val() + $('#b').val() + $('#c').val() +'</h1>', isHtml: true });
well done
it's working with me
but I need add label before value of a or b or c like this
name: value of a
I did like this
cordova.plugins.email.open({ to: 'a@a.com', subject: 'AAAAA', body: '<h1>'First Name + $('#a').val() Last Name + $('#b').val() User Name+ $('#c').val() +'</h1>', isHtml: true });
but not working with me :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to quote the strings you are concatenating. For example:
'<h1>' + "First Name" + $('#a').val() + ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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>
Segund example:
<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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do not use the " intel.xdk." plugins, they have been retired and are not being updated or maintained. There are many third-party Cordova plugins that provide far more features and are being maintained by the open source community. Check the "featured plugin" list, I believe there is an email plugin there. If not, search GitHub or the Cordova plugin registry for additional options.
![](/skins/images/06022F5BB6D2F28C8F102671A0F06E85/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page