Command Line Mass Mailing Tool

There are lots of tool for mass-mailing, but this tool is the tool for which i am talking about is based on command line. It is a very simple tool with as much as configurations for applications and mail framework properties.

All application configurations will be given through the  application.properties where you have to provide the settings like password, email list file, email file, return path, log file, debug option, mailer and mail format like text, html, etc..

Email Settings
Email settings file mainly contains all email settings which required by the Java Mailing apis, you may fine complete properties list here. some of the important properties ate are host, port, user name etc..
Application folder - contains all files
Application property `application.list` used to pass the email list to the application. This file heaving a very simple format one line is equals to one email address. it means if you wanted to send email to 1000 people you have create 1000 lines in this file and place the complete path of that file in application.list parameter. default file is list.txt its already there with the program.

Setup Email
Application property  `application.email` used to pass the email data to the application. You can write Text or HTML data in that file for the movement it does not support any attachments.

Setting Host and Port
Host and port both settings are related to the Email framework configurations, you may find the properties mail.smtp.host and mail.smtp.port in the email configurations. it varies based on which smtp server you are using. Here i have used an yahoo smtp server.

Setting User and Password
User and password are related to the different configurations, user is comes from the mail configurations while password is comes from the application configurations, as because mail configuration is a set of standard properties of Java Mail API not contains the property for the password. If you plan to send email using user/password authentication then mail.smtp.auth property must be set to true or else set to false if you plan to send email using local smtp program like sendmail.

Run Mass mail
Once you ready with all configurations, you just need to execute either run.sh or run.bat depending on your operating system. and It will start throwing email to the and logging the same in the logfile. Have a look at the sample run below.

Download
Click here to download the Application 

Sample Run
mantavya@mga-laptop:~$ cd Desktop/massmail/
mantavya@mga-laptop:~/Desktop/massmail$ ./run.sh 
19 Jun, 2011 1:30:19 PM in.mantavyagajjar.massmail.MailManager loadProperties
INFO: Read application settings application.properties successfully !
19 Jun, 2011 1:30:19 PM in.mantavyagajjar.massmail.MailManager loadProperties
INFO: Read mail settings mail.properties successfully !
19 Jun, 2011 1:30:19 PM in.mantavyagajjar.massmail.MailManager <init>
INFO: Session created successfully !
19 Jun, 2011 1:30:19 PM in.mantavyagajjar.massmail.MailManager run
INFO: Reading emaillist list.txt successfully !
19 Jun, 2011 1:30:19 PM in.mantavyagajjar.massmail.MailManager run
INFO: Reading e-mail from email.txt successfully !
19 Jun, 2011 1:30:22 PM in.mantavyagajjar.massmail.MailManager run
INFO: Email sent successfully - mantavyagajjar@gmail.com

Comments

Popular posts from this blog

Implement OpenERP for Service company

Server Action - Improvements