Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Last active March 9, 2017 20:50
Show Gist options
  • Save ssaurel/548076d1aadba8e983cf06cbc0e1e795 to your computer and use it in GitHub Desktop.
Save ssaurel/548076d1aadba8e983cf06cbc0e1e795 to your computer and use it in GitHub Desktop.
Block of code to call the GMailSender class
new Thread(new Runnable() {
@Override
public void run() {
try {
GMailSender sender = new GMailSender("sylvain.saurel@gmail.com",
"your_password");
sender.sendMail("Hello from JavaMail", "Body from JavaMail",
"sylvain.saurel@gmail.com", "sylvain.saurel@gmail.com");
} catch (Exception e) {
Log.e("SendMail", e.getMessage(), e);
}
}
}).start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment