项目作者: NoelChew

项目描述 :
Android Library for SparkPost (Email Delivery Service & Transactional Email)
高级语言: Java
项目地址: git://github.com/NoelChew/android-sparkpost.git
创建时间: 2016-07-26T07:06:48Z
项目社区:https://github.com/NoelChew/android-sparkpost

开源协议:MIT License

下载


android-sparkpost

Release

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

How to Use

  1. SparkPostEmailUtil.sendEmail(context,
  2. sparkPostApiKey,
  3. subject,
  4. message,
  5. new SparkPostSender(senderEmail, senderName),
  6. new SparkPostRecipient(recipientEmail),
  7. new EmailListener() {
  8. @Override
  9. public void onSuccess() {
  10. // do something here
  11. }
  12. @Override
  13. public void onError(String errorMessage) {
  14. // do something here
  15. }
  16. });

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:

  1. allprojects {
  2. repositories {
  3. jcenter()
  4. maven { url "https://jitpack.io" }
  5. }
  6. }

Application level gradle:

  1. dependencies {
  2. implementation 'com.github.noelchew:android-sparkpost:x.y.z'
  3. implementation 'com.squareup.okhttp3:okhttp:4.2.2'
  4. implementation 'com.google.code.gson:gson:2.8.6'
  5. }

Note: do not add the jitpack.io repository under buildscript

Proguard

  1. -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.