https://github.com/echo2echo/perl-email-tools
Procedure and Script to merge email address files and purge duplicate records resulting in one sorted file with unique email addresses and a script to send to mid size email lists.
https://github.com/echo2echo/perl-email-tools
addresses email email-list merge perl purge purge-duplicate-records smtp sort unique
Last synced: 3 months ago
JSON representation
Procedure and Script to merge email address files and purge duplicate records resulting in one sorted file with unique email addresses and a script to send to mid size email lists.
- Host: GitHub
- URL: https://github.com/echo2echo/perl-email-tools
- Owner: echo2echo
- License: gpl-3.0
- Created: 2021-05-14T02:05:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-28T23:17:58.000Z (almost 4 years ago)
- Last Synced: 2024-12-21T21:23:11.002Z (5 months ago)
- Topics: addresses, email, email-list, merge, perl, purge, purge-duplicate-records, smtp, sort, unique
- Language: Perl
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Perl-Email-Tools
## merge_purge_sort.pl
This is a procedure and script to merge email address files and purge duplicate records resulting in one sorted file with unique email addresses.
Make sure your email list(s) have only one address per line with no given name, only email address and no blank lines. Do a visual inspection of your lists and see if they look ready for use.
Next, create a single concatenated file of all your email address files by running the cat command on your line separated email files...
Merge address files and name the concatenated and redirected file "cat.txt" as shown below
$ cat emailfile1.txt emailfile2.txt emailfile3.txt > cat.txtGrant permission to run script
$ sudo chmod 755 merge_purge_sort.pl
Run the Perl script as follows to purge duplicate addresses and get a redirected file of sorted and unique email addresses
$ ./merge_purge_sort.pl > unique_sorted_emails.txtThis script was written for line separated email address files with only the email address and not the person's name as part of each record.
## mail.pl
You will need a working SMTP server and Perl installed for this script to run
Timing of this script clocked-in at sending over ~10 emails per second or the equivalent of ~36,000 emails per hour on modest hardware and network speeds. Probably enough horsepower for mid size email lists.
You may need to install the MIME::Lite Perl module
To Install MIME::Lite Perl module...
$ cpan -i MIME::Lite
Or$ cpanm MIME::Lite
Or if these don't work try apt install on Ubuntu/Debian Linux$ sudo apt install libmime-lite-perl
This script runs in the same folder as the unique_sorted_emails.txt file described above in the merge_purge_sort.pl instructions.
### I do some test mailings with an address text file that has a few of my own email addresses before I run the script on the "big" list to check for any errors and to see if it looks good enough to send. Once it looks good, replace your test file with the unique_sorted_emails.txt or your own production ready file
Make changes to the test_example_file.txt file to test with your own email addresses.
Grant permission to run mail.pl file
$ sudo chmod 755 mail.pl
To run the script with your sorted and unique address file verify the file unique_sorted_emails.txt, or your production ready email list, is referenced in mail.pl and is run in the same directory as the list.$ ./mail.pl