Skip to content

Instantly share code, notes, and snippets.

@csemrm
Created September 13, 2017 11:07
Show Gist options
  • Select an option

  • Save csemrm/620b1bfe17d1ae5818f7c17eebf6dc2b to your computer and use it in GitHub Desktop.

Select an option

Save csemrm/620b1bfe17d1ae5818f7c17eebf6dc2b to your computer and use it in GitHub Desktop.
Email Dialog
var win = Ti.UI.createWindow({
title : "Modal Window"
});
var Button = Ti.UI.createButton({
title : 'Click Me!',
});
var emailDialog = Ti.UI.createEmailDialog();
emailDialog.subject = "Hello from Titanium";
emailDialog.toRecipients = ['csemrm@gmail.com'];
emailDialog.messageBody = '<b>Appcelerator Titanium Rocks!</b>';
var file = Ti.Filesystem.getFile('movie.wav');
emailDialog.addAttachment(file);
Button.addEventListener('click', function() {
emailDialog.open();
});
win.add(Button);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment