Android Library for SparkPost (Email Delivery Service & Transactional Email)
Android Library for SparkPost -> Email Delivery Service & Transactional Email
SparkPostEmailUtil.sendEmail(context,
sparkPostApiKey,
subject,
message,
new SparkPostSender(senderEmail, senderName),
new SparkPostRecipient(recipientEmail),
new EmailListener() {
@Override
public void onSuccess() {
// do something here
}
@Override
public void onError(String errorMessage) {
// do something here
}
});
You will need to create a SparkPost API key
To start sending emails with your own domain, you will need to create a sending domain
Next, you will need to verify the sending domain
Using the “Test” plan, you can send up to 500 emails/month or 100 emails/day for free
Else, you can send 5 emails using anyname@sparkpostbox.com
This library is hosted by jitpack.io.
Root level gradle:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
Application level gradle:
dependencies {
implementation 'com.github.noelchew:android-sparkpost:x.y.z'
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
implementation 'com.google.code.gson:gson:2.8.6'
}
Note: do not add the jitpack.io repository under buildscript
-keep class com.noelchew.sparkpostutil.library.** {*;}
I am not in any way affiliated with SparkPost. You can also try using the java library by SparkPost.