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 firstname.lastname@example.org "My Subject" /mail/content.txt -to "email@example.com,firstname.lastname@example.org" -cc "email@example.com" -bcc "firstname.lastname@example.org"
Send mail using cssendmailEx.sh
echo "This is mail content" | /mithi/mcs/bin/cssendmailEx.sh email@example.com "My Subject" -to "firstname.lastname@example.org,email@example.com" -cc "firstname.lastname@example.org" -bcc "email@example.com"
cat <file name> | /mithi/mcs/bin/cssendmailEx.sh firstname.lastname@example.org "My Subject" -to "email@example.com,firstname.lastname@example.org" -cc "email@example.com" -bcc "firstname.lastname@example.org"
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
email@example.com,/bulk/userfile1.txt, firstname.lastname@example.org,/bulk/userfile2.txt, email@example.com,/bulk/userfile3.txt, firstname.lastname@example.org,/bulk/userfile4.txt, email@example.com,/bulk/userfile5.txt, firstname.lastname@example.org,/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.
Using the Command line interface
Sign in as the root user.
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.
bulkmail.sh email@example.com /root/my.csv "Meeting" 5 2 "" "" (Send mail from firstname.lastname@example.org 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 email@example.com /root/my.csv "Meeting" 5 2 firstname.lastname@example.org Administrator (Send mail from email@example.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 firstname.lastname@example.org. Append 'Administrator' as a nickname to the from part.)
- 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.