Method 1: Sending mails to a group
- Create a group for all the recipients
- Send a mail to this group using outlook or webmail.
- This method can be used when the recipient ids are fixed.
Method 2: A common mail to be sent to some recipients. (For in-premise servers only)
Send a mail using cssendmail.sh
/mithi/mcs/bin/cssendmail.sh user@mithi.com "My Subject" /mail/content.txt -to "user1@mithi.com,user2@mithi.com" -cc "user3@mailjol.com" -bcc "user4@mailjol.com"
Send mail using cssendmailEx.sh
echo "This is mail content" | /mithi/mcs/bin/cssendmailEx.sh user@mithi.com "My Subject" -to "user1@mithi.com,user2@mithi.com" -cc "user3@mailjol.com" -bcc "user4@mailjol.com"
OR
cat <file name> | /mithi/mcs/bin/cssendmailEx.sh user@mithi.com "My Subject" -to "user1@mithi.com,user2@mithi.com" -cc "user3@mailjol.com" -bcc "user4@mailjol.com"
Method 3: Use a third-party group mail software
Use this method if a common mail should go to the number of recipients. The recipient ids keep changing every time. The mail has to be sent to thousands of email ids.
- Download the software from:
- Group Mail
- Create a file of recipients
- Create a file for the mail to be sent
- Use the group mail software to send the bulk mail
Method 4: Use Bulk mailing (For in-premise servers only)
Bulk mailing can be used to send bulk mail to a list of users. It allows you to send different/customized data to each user. These users are valid email ids on the same server or remote email ids.
CSV file format:
- The csv file contains data in the following format
userid1@mylocaldomain.com,/bulk/userfile1.txt, userid2@mylocaldomain.com,/bulk/userfile2.txt, userid3@myanotherlocaldomain.com,/bulk/userfile3.txt, userid4@myanotherlocaldomain.com,/bulk/userfile4.txt, userid5@yahoo.com,/bulk/userfile5.txt, userid6@remotedomain.com,/bulk/userfile6.txt,
- The file name next to the email id is what will be sent to the recipient as the message of the mail.
- The delay between two batch operations is required to give the server a break during two bulk sends so that it can process other requests. The batch size specifies the number of messages to be sent in one bulk send operation.
- The from id is what the recipient will see as the sender id and may even respond to this. Please give a valid email id here.
Command
Using the Command line interface
Sign in as the root user.
Command:
bulkmail.sh [sender email-id] [CSV file path] [Subject] [Delay Time between batches (sec)] [Batch size] [Bounce-To emailid] [Nickname]
Description: To send bulkmail.This script generates an output file in the '/bulk folder' called 'mylist.csv.log'(if mylist.csv was the CSV file specified as an input) which contains a list of ids to whom the mail couldn't be sent. The reason for failure is also listed alongside in the same log file.
Example
bulkmail.sh admin@mithi.com /root/my.csv "Meeting" 5 2 "" "" (Send mail from admin@mithi.com to recipients listed in my.csv, with a batch of 2 messages at a time and a delay of 5 seconds between batches. If any of the ids generates a bounce message, it shall go to sender, No nick name to display.) bulkmail.sh admin@mithi.com /root/my.csv "Meeting" 5 2 postmaster@mithi.com Administrator (Send mail from admin@mithi.com to recipients listed in my.csv, with a batch of 2 messages at a time and a delay of 5 seconds between batches. If any of the id's generates a bounce message, send it to postmaster@mithi.com. Append 'Administrator' as a nickname to the from part.)
Note
- You can specify either message file or attachment file(s) or both. Multiple attachments are separated by '%'
- Be aware of your server's mail policies and capacity while using attachments. The performance can be adversely affected.
- All the parameters are compulsory, Bounce-To Emailid and Nickname can be blank.
Warning: If you interrupt this operation, there is no way to restart from where it left off.If you restart the operation it will resend all the messages causing duplicate deliveries in some cases.