java.lang.Object | |
↳ | com.neomades.io.mail.EmailManager |
This class allow to send Email
messages using native email
clients.
Due to platforms limitations, you can not get confirmation on whether the
email was sent or not.
Here is a basic code sample showing how to send an email message with NeoMAD :
// Create an Email instance and define its content. // You can chain setters as they all return the Email instance. Email email = new Email().setTo("newbie@neomades.com").setCc("john.doe@neomades.com;jane.doe@neomades.com") .setSubject("NeoMAD is a great tool !") .setBody("You should definitely try NeoMAD, it's a great tool for mobile developpers."); // Set an action chooser title for Android platforms EmailManager.getDefault().setActionChooserTitle("Select an email client :"); // Send the email EmailManager.getDefault().send(email);
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static EmailManager |
getDefault()
Returns the default EmailManager.
| ||||||||||
static boolean |
isEmailAvailable()
For iOS, returns true if the device is configured to send mail.
| ||||||||||
void |
send(Email email)
Open a native email client with a new prefilled message using the provided
Email parameter. | ||||||||||
EmailManager |
setActionChooserTitle(String actionChooserTextDialog)
Only for Android.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Returns the default EmailManager.
For iOS, returns true if the device is configured to send mail.
On Android, this method will always return true. The system will open an application chooser and will ask for email account configuration if necessary.
Only for Android.
actionChooserTextDialog | string used only on Android platforms to define the title of the intent chooser dialog. |
---|