Giter VIP home page Giter VIP logo

ac--easymail's Introduction

AC EasyMail: Sending Emails without Intent

A friend asked me about how can you send a email without using Intents, focused in send an email without user intervention, so we searched and found out that Jon Simon did a great job implementing a wrapper for JavaMail for Android, so i though we should build a Library to ease this work.

Usage

First, you need to add the EasyMail.jar, then you can create a instance of EasyMail:

EasyMail mail = new EasyMail(user, password);

which receives two parameters, the user of your account like "[email protected]" and your password as Strings. Now you need to pass some more parameters like:

      `String[] directionsToSend = {"[email protected]", "[email protected]"}; 
	   mail.setTo(directionsToSend);
       mail.setFrom("[email protected]"); 
       mail.setSubject("This is a test."); 
       mail.setBody("This is an email sent using my Mail JavaMail wrapper from an Android device.");`

Finally, you need to send the email, so we do the next:

	`try { 
	              if(mail.send()) { 
		//Say sent
	              } else {
		//Say not sent 
	              } 
	            } catch(Exception e) { 
		//Print StackTrace
	            }`                

And that's all!

Dependencies

You need to add three more libraries for JavaMail: activation.jar, additional.jar and mail.jar.

Version

Version 0.1, which helps you send emails without using Intents. Pull requests are well received!

Demo

Feel free to clone this project and run in your IDE to see how can be implemented :).

Questions

You can contact me via StackOverflow, using the message system from Github or via email: [email protected]

ac--easymail's People

Contributors

cogitovsmachina avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.