Sunday, September 21, 2008

GMailSender 1.1

Friends, At last I have come up with new version of GMailSender. In this version I have added a new Facility of attaching a file with this mail. Now you can attach a file with your message. The functionality is same as last version. Here you have to add one more thing to the function named filepath. And class name has been changed from Mail to GMailSender.

Steps of using GMailSender in your Java Code:

  1. Get mail.jar from java.sun.com
  2. Download GMailSender 1.1.jar
  3. Set the path of GMailSender.jar in the classpath of your operating system
  4. Now in your java code import gmailsender package. (import gmailsender;)
  5. Then in a function where you want to send message type: GMailSender.sendMail("your_account@gmail.com","your_Account_Password,"receiver_mail@mail.com","subject_of_message","message.....................","file path_that_is_to_be_attached");
  6. Now run your program and see what happens.

Get GMailSender 1.1 From here


Be ready for new version of GMailSender 1.2 within few days!!

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.