Varun_Krishna

composeMessage.js

Mar 25th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var composeMessage = {
  2.     create: function() {
  3.         alert("you have clicked the compose message button");
  4.         window.location="composeMessage.html";
  5.     },
  6.     send:function (){
  7.         /*var message = "mailto:[email protected]"
  8.                         + "[email protected]"
  9.                         + "&subject=" + escape("This is my test mail")
  10.                         + "&body=" + escape(document.getElementById('textArea1').value);
  11.                         window.location.href = message;*/
  12.         window.plugin.email.open({
  13.             to:      ['[email protected]'],
  14.             cc:      ['[email protected]'],
  15.             //bcc:     ['[email protected]', '[email protected]'],
  16.             subject: 'Test Mail with attachments',
  17.             body:    'How are you? Dingling Mingling Nice greetings from the Me.',
  18.             attachments: [
  19.                 'relative: //HelloWorld/www/res/icon/android/icon-36-ldpi.png',            
  20.             ]          
  21.         });
  22.         //window.plugin.email.open();
  23.         alert("Message Successfully sent!");
  24.     },
  25.     reset: function() {
  26.         alert("Are you sure you want to clear the fields?");
  27.         document.getElementById("inputTo").value="";
  28.         document.getElementById("textArea1").value="";
  29.     }
  30. };
Advertisement
Add Comment
Please, Sign In to add comment