Created
April 16, 2015 09:34
-
-
Save rajubd49/64e62afbcab9b86a25f0 to your computer and use it in GitHub Desktop.
Email Attachment local file - Appcelerator Titanium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({ | |
backgroundColor : "gray" | |
}); | |
var btn = Ti.UI.createButton({ | |
title : "open email dialogue", | |
top : 100, | |
left : 100, | |
height : 150, | |
width : 150 | |
}); | |
btn.addEventListener("click", function() { | |
var emailDialog = Ti.UI.createEmailDialog(); | |
emailDialog.subject = "Hello from Titanium"; | |
emailDialog.toRecipients = ['xyzabc@yahoo.com']; | |
emailDialog.messageBody = '<b>Appcelerator Titanium Rocks!</b>'; | |
var f = Ti.Filesystem.getFile('cricket.wav'); | |
emailDialog.addAttachment(f); | |
emailDialog.open(); | |
}); | |
win.add(btn); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment