Here are the advantages of using Mail.exe:
Where allowed options are:
-sn <dir> | Send-a-Note mode: the <dir> directory (required) contains one or more messages generated by ThinkDesign's Send-a-Note tool. Multiple directories (messages) can be processed in a single run by using wildcards, as explained below. |
-to "x" | Defines the recipient(s) of the message |
-subject "x" | Defines the subject of the message |
-text "x" | Defines the text of the message as a char string |
-text "@x" | Defines the text of the message as the contents of "x" file. Multiple text files may be processed using wildcards: in this case a separate e-mail is sent for each text file found, using the same recipient and subject. |
-attach "x" | Defines files to be sent with the message as attachments. Multiple file names can be included in the "x" list, separated by colons (;). |
-del | Data has to be removed from disk after successful sending of the message(s) |
-edit | Before sending the mails it shows their contents so to do the editings, if any. |
-log "x" | The error messages, if any, are written on the "x" file. If this option is missing the error messages are displayed on a MessageBox. |
-profile "x" | Use profile "x" to access MAPI services (default: use standard profile) |
-user "x" | Username to be used for logon |
-passwd "x" | Password to be used for logon |
-single | Together with the "wait" option it allows to schedule the program and to make it wait for a pre-defined time. This way it is not necessary to activate an external agent to schedule the program. |
-wait "x" | Together with the "single" option it allows to show the wait-range in term of seconds of the program. Used by itself, it warrants that there is only one scheduled copy of the program: each time the program starts, it checks that there isn't a copy of itself being executed, on the contrary it waits "x" seconds for the operation being carried out to end; if this doesn't happen, it ends up displaying an error. |
Mail.exe -sn C:\SendMailDir\mail_* -del
Send messages contained in all subdirectories of "C:\SendMailDir" whose
name matches the wildcard expression: "mail_*" (e.g.: mail_001, mail_user1_1,
..). Each subdirectory is deleted after its message has been successfully
sent.