Youtube Channel

mail merge using mozilla thunderbird

dear friends as a job seeker you have come across a situation where you have to send an application to different different organizations with the same contents. so , finally today what i am going to do is little bit programming and going to use mail merge to send the mails to different hr's at the same time with same content.
what we need is , 
Mozilla Thunderbird., which you can download from here.
next is ms-excel and hr email ids.

In my case i have the hr's id is coping from my blog itself which is available  here,
Now through file operations and pattern matching i will get the only emails id .for that i will copy the contents of the page to a txt file . eg. mail.txt.
The simple program is given below

package com.pack.fileHandling;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ReadFile {
    public static void main(String[] args) throws Exception{

        String mypattern="[a-zA-Z][_A-Za-z0-9]*@[A-Za-z]+([.][A-Za-z]+)+";
        Pattern p=Pattern.compile(mypattern);
        BufferedReader br=new BufferedReader(new FileReader("d:\\email.txt"));
        String line=br.readLine();
        while(line!=null)
        {
            Matcher m=p.matcher(line);
            while(m.find())
            {
                System.out.println(m.group());
            }
            line=br.readLine();
        }
        br.close();
    }

}

And  i have the output as  follows
admin@aahlaad.com
shivnarayan@accenture.com
reddy@accenture.com
md@accenture.com
raj@accenture.com
mailer@mailer.accenture.com
kumar@accenture.com
rahangdale@accenture.com
priya@accolite.com
mr1@acculogix.com
pr@acculogix.com
hr@accuversa.com
samal@adecco.co.in
sahu@adecco.co.in
singh@adecco.co.in
bamana@adecco.co.in


Next save these emails id to the excel file using column name as mail, and extension as .csv in a single column

Next open Thunderbird --> new mail( control + N)




Install mail merge

First thing you have to do is to download Mozilla Thunderbird. After installation, launch Thunderbird and it will ask for your email account. You can create a new one or use an exisiting account of yours.
Now, to install the add ons – Mail Merge. On the upper right side, you can see a "list" icon. Click on it and then click on add-ons.
On the add-ons manager page, search for Mail Merge. Click install and restart Thunderbird for the add-on to work.

1. Create a CSV file

The first thing that need to be done before you can send out your mails is to create a CSV file. To create a CSV file you can use any spreadsheet tool, if you have Microsoft Excel, you can use that.
The first row of the spreadsheet is used to enter the variables you want to use, for example – first name, last name, mail and etc. After you’re done, save the spreadsheet in CSV format.

2. Drafting Personalized Mail

Click on File > New Message > Message or press Ctrl + N
Enter the variables at places that you want the values to appear. Each variable should be enclosed using the double curly braces, for example {{FIRST NAME}}. Enter variable exactly the same as in the CSV file, this includes spelling, spacing and capitalization.
After you’re done with message creation, click on File > Mail Merge. Set Source > CSV , Deliver Mode > Send Later and Format > Both.
Under CSV section, for File, click on browse to locate the CSV file (spreadsheet) you did earlier. After you’re done click "OK".
After clicking "OK", your mail and CSV file will merge. Earlier, we set "Deliver Mode" to send later, so the mails can be found in Local Folders > Outbox. Click on the mail and you’ll notice that your variables has been replaced with the values in your CSV file.
To send out the mails, click on the "list" icon on the upper right, File > Send Unsent Messages.
Thats all with mail merge . Enjoy
Next PostNewer Post Previous PostOlder Post Home