Skip to content

This is a sample for sending email via sendGrid , it resolves the conflict of httpClient used by send-grid java library and can be easily integrated in your project

License

Notifications You must be signed in to change notification settings

alifarina/SendgridAndroid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SendgridAndroid

This is a sample for sending email via sendGrid , it resolves the conflict of httpClient used by send-grid java library and can be easily integrated in your project

The original repository has been taken from https://github.com/danysantiago/sendgrid-android

but the code runs on lower api version gives exception of using legacy HttpClient which android no longer support. So here is some LOC changes to make it work.

Add these lines of code in your build.gradle of your project.

...

 dependencies {
     implementation ('com.github.danysantiago:sendgrid-android:1'){
             exclude group: 'org.apache.httpcomponents', module: 'httpclient'
     }
}

Change the SENDGRID_USERNAME/SENDGRID_PASSWORD or you can use the SENDGRID_API_KEY

...

            SendGrid sendGrid = new SendGrid(SENDGRID_USERNAME, SENDGRID_PASSWORD);

            Or you can use the send grid key
            SendGrid sendGrid = new SendGrid(SENDGRID_API_KEY);

Add the attachments and we are good to go.

Voila!!

About

This is a sample for sending email via sendGrid , it resolves the conflict of httpClient used by send-grid java library and can be easily integrated in your project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages