This example demonstrates how to use NetMailBot's -delimiter parameter to alter the character(s) used to delimit email addresses logged in good, bad, and suspect email logs (recall that these are generated with the -loggoodemail, -logbademail, and -logsuspectemail parameters, respectively). This can be useful if you need to use a different delimiter than the default, which is a space.
NOTE: Carriage Return / Line Feed (CR/LF) cannot be used as the delimiter.
NOTE: -delimiter also determines what delimiting character(s) to expect in email list files specified in the -tolist, -cclist, and -bcclist parameters. Therefore, using -delimiter makes it a requirement that the same delimiter be used both in generated good / bad / suspect log files and multiple-recipient list files (for -tolist, -cclist, and -bcclist).
Prepared Example Files
The archive contains two files:
Batch File Contents
This is the content of the batch file:
NetMailBot -to email@example.com -body "Using a Customized Delimiter" -cclist "cclist.txt" -from firstname.lastname@example.org -server smtp.mycompany.com -subject "Customized Delimiter" -delimeter ":" -loggoodemail "goodmails.txt" -logbademail "bademails.txt" -recipientlimit 2
This is the content of the cclist.txt file:
NOTE: Thus, when sending to "Cc:" or "Bcc:" recipients, the "To:" address is ignored in the count specified by -recipientlimit. This is reflected in the output below: each mail has two "Cc:" recipients, and -recipientlimit was set to 2.
Connecting to smtp.comcast.net
Adding TO(1): email@example.com
Adding CC(2): firstname.lastname@example.org
Adding CC(3): email@example.com
Sent to mail server
Adding TO(4): firstname.lastname@example.org
Adding CC(5): email@example.com
Adding CC(6): firstname.lastname@example.org
Sent to mail server
Mail sent successfully to 6 recipients
Here is the "goodemails.txt" log file resulting from the above operation (using our custom delimiter):
NOTE: You may be wondering about our test "Cc:" email addresses in this example: they seem to be "bogus" addresses, so why did they show up in the "goodemails.txt" file? Did we receive any bounces? The answer is no.
By definition, a "bounced" email is one that has been returned, after a period of time, because the sending SMTP server cannot contact the domain of the email address being sent to.
During the send, our SMTP server is not verifying the validity of the email addresses used. Therefore, none of them go into the "bad" category. The bad and suspect log files are mainly used for the verification functionality of NetMailBot and are hardly ever populated when just sending email. We have included -logbademail here just to illustrate this dynamic.
We say "mainly" and "hardly" because only about 1% of SMTP servers will lookup an email address without being explicitly asked to verify it, and an address might show up in the "bad" category if it is malformed, like "akjdlfjslf" (no domain specified) or if it is in the same domain as the mail server, but the mail server does not recognize it as being valid. This behavior varies from server to server. For instance, suppose we are using the server smtp.mycompany.com to send email with NetMailBot. An address like email@example.com could be rejected by this server because it is not a valid email address on the mycompany.com domain.
NOTE: Email address verification is maintained in NetMailBot only for backward compatibility with older versions, but is no longer a supported feature.