Skip to content

Android Library for SparkPost (Email Delivery Service & Transactional Email)

License

Notifications You must be signed in to change notification settings

NoelChew/android-sparkpost

Repository files navigation

android-sparkpost

Release

Android Library for SparkPost -> Email Delivery Service & Transactional Email

How to Use

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	
                        }	
                    });	

Account Setup

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

Integration

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

Proguard

-keep class com.noelchew.sparkpostutil.library.** {*;}	

Disclaimer

I am not in any way affiliated with SparkPost. You can also try using the java library by SparkPost.

About

Android Library for SparkPost (Email Delivery Service & Transactional Email)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages