Mail Extension for droidQuery
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libs Updated to latest droidQuery version Nov 18, 2013
res first commit Jul 4, 2013
src/self/philbrown/droidMail Updated to latest droidQuery version Nov 18, 2013
.gitignore first commit Jul 4, 2013
AndroidManifest.xml first commit Jul 4, 2013
LICENSE.txt first commit Jul 4, 2013
README.md changed name from $Mail to Mail Aug 8, 2013
lint.xml Updated to latest droidQuery version Nov 18, 2013
proguard-project.txt
project.properties first commit Jul 4, 2013

README.md

droidMail


droidMail is a droidQuery extension for sending emails in Android without using Intent.

To use, add as a droidQuery extension:

try {
    $.extend("mail", "self.philbrown.droidMail.Mail");
}
catch (Throwable t) {
    Log.e("MyApp", "Could not add mail extension");
}

Then to send an email message:

$.with(this).ext("mail", new MailOptions("{ email: 'john.doe@gmail.com',
                                            username: 'john.doe',
                                            password: 'idkmypsswd',
                                            provider: 'gmail',
                                            destination: 'jane.doe@yahoo.com',
                                            subject: 'I love you',
                                            message: 'Have a great day at work!',
                                            attachment: 'path/to/file.txt'
                                          }"));

Alternatively, one can create the $Mail instance, and use it later to send messages:

Mail mail = (Mail) $.with(this).ext("mail", new MailOptions("{ email: 'john.doe@gmail.com',
                                                               username: 'john.doe',
                                                               password: 'idkmypsswd',
                                                               provider: 'gmail' }"));
mail.send("{ destination: 'jane.doe@yahoo.com',
             subject: 'I love you',
             message: 'Have a great day at work!',
             attachment: 'path/to/file.txt'
          }");