How do I automate the installation of the Email Object?
Melissa Data has provided a set of scripts to download the DQ Suite and its misc Email files every month. Download the scripts and insert your custom download links within the configuration params file and then set the scripts to run as a scheduled task. The Windows batch scripts are provided on the DQ Suite DVD, the monthly download in the extras-scripts directory and also here: https://www.melissa.com/scriptcode/updaters.zip. UNIX shell scripts will be available soon.
What are bitwise operations and why do I need to know them for Email Object?
A Bitwise operation uses a multi-bit type, commonly an integer, and operates at the level of its individual bits. More specifically, we are going to use bit masking when dealing with the Email Object ChangeCode property. Lets first discuss why we are using bitwise operations.
The Email Object ChangeCode indicates how the email address has been changed during verification. Currently, there are four possible changes: Syntax, Top Level Domain (TLD), Domain Spelling, and Domain Updated. Any combination of these changes can occur in an email address at once. Just based on these 4 possible changes, we have 15 different combinations of changes in an email address. If we add a 5th possible change, that number jumps to 31. To handle these possible changes combinations while accounting for future additions, we decided to use bitwise operations.
The ChangeCode property simply returns an integer. However, the actual information provided is at the bit level. The first bit corresponds to a syntax change, the 2nd bit to a TLD change, the 3rd to Domain Spelling, and 4th to Domain Update. If a specific change has occurred, we set that bit to 1, otherwise we leave it as 0. So, if the Domain Spelling and the syntax has changed, the ChangeCode becomes 0101 and we get the decimal equivalent of 5.
Now, to actually extract the information from the change code, we make use of bit masking. Bit masking isolates a specific bit so we can see if it is set or not. We do this by performing a logical AND operation on the change code and the bit mask for the bit we want to isolate. The bit mask is simply the integer equivalent of the change code in the Email Object guide, 1 for syntax, 2 for TLD, 4 for domain spelling, and 8 for domain update. Lets take a look at a bit masking example with a ChangeCode of 5(0101) and the bit mask for domain spelling, 4 (0100).
0101 AND 0100 = 0100
As you can see, the bit mask isolates just the 3rd bit. Since the 3rd bit of the result is 1, we know that the 3rd bit of the original change code was also 1, and the domain spelling changed. In order to extract all the changes from the ChangeCode, we must perform the bit masking operation on all the possible changes. So, your code would look something like this.
if(ChangeCode = 0) print "No Changes" if(ChangeCode AND 1 = 1) print "Syntax Changed" if(ChangeCode AND 2 = 2) print "TLD Changed" if(ChangeCode AND 4 = 4) print "Domain Spelling Changed" if(ChangeCode AND 8 = 8) print "Domain Updated"
Note: The above was just pseudo code. It will not work as is. Bitwise operations are much more complex than what has been presented here. Please do more research on your own if you are interested.
What is MXLookup?
The Email Object has an option to use MXLookup to determine whether a domain is valid or invalid. MXLookup can determine whether the actual mail server is accepting email messages or not. An internet connection is required to use MXLookup.
Can I add/remove my own list of valid/invalid Email Domains?
Yes, the Email Object can be setup to check against your own list of valid/invalid email addresses. To do this, edit your mdEmailConfig.ini located in the data files directory of the object. To forcefully overwrite the list of valid domains, add them below [valid domains]. To forcefully overwrite the list of invalid domains, add them below [invalid domains].
What data files are needed by the Email Object?
The Email Object has only 3 required data file:
How can I further customize the Email Object?
Under the Email Data Files folder, edit the mdEmailConfig.ini file. Here you will see a set of different rules that you can set in order to customize the way Email Object works. The mdEmailConfig.ini file allows you to:
- Add/Remove domain mispelling rules
- Add/Remove updated domains
- Add/Remove valid domains
- Add/Remove invalid domains
- Add/Remove valid mailboxes
- Add/Remove mobile domains
Instructions on how to edit the mdEmailConfig.ini file are provided within the comments of the file.