Tuesday, June 24, 2008

GMailSender

I have developed an Small Java Library named GMailSender which is used to send Mail using Gmail service. To use this library you must have an account on GMail.

It is very easy to use it.

It contains just one function using it you can send Email to any person in the world from your computer from your java code. The function name is sendMail which is a static function. This function contains some parameters as user email (gmail user email), password, receiver's email address, subject and message in plain text format:

Mail.sendMail("abc@gmail.com","pwd","rec@hotmail.com","subject","message.....................");

Now what are the required steps:
  • You need to have mail.jar, get it from java.sun.com
  • Get GmailSender.jar from clicking here.
  • In your java code import gmailsender package (import gmailsender.*;), this package contains a class file named Mail.
  • And then in your code use Mail.sendMail() to send mail to other person.
  • And enjoy it!
Click Here to Download GMailSender:

I will make improvements in this library. This is first version of this library.