v3.0 6 August 2008 : Removed the GUI form the original script
v3.1 22 August 2008 : Updated to “autofind” a hub server if -server is not specified
v3.2 7 November 2008 : Some minor tweeks. Added event logging.Added Error Event logging
This script uses .net (System.Net.Mail.MailMessage) to send an email
– Reports output to the Application EventLog with Event IDs of:
18 Script Starting
19 Script Finished
1801 Details of sent message
1802 Details of any errors
COMMANDLINE OPTIONS
No Commandline ………. This help text
-? …………………. This help text
-server .. Default is localhost. <BR> If you specify “AutoDiscover” a Hub Transport Server <BR> will be randomly selected<BR>-from <EMAIL address>… From Email Address. Default is <A href=”mailto:nobody@send-mail.ps1″ mce_href=”mailto:nobody@send-mail.ps1″>nobody@send-mail.ps1</A><BR>-to <EMAIL address>….. TO email address<BR>-cc <EMAIL address>….. CC email address<BR>-bcc <EMAIL address>…. BCC email address<BR>-toCSV <CSV name file>.. CSV file with email address.<BR>-ccCSV <CSV name file>.. CSV file with email address.<BR>-bccCSV <CSV name file>. CSV file with email address.<BR>-subject <TEXT>……… Message Subject. <BR> Default value will be set if not specified<BR>-body <TEXT>………… Message Body. <BR> Default value will be set if not specified<BR>-attachment <PATH Filename and><BR>-msgcount <NUMBER>…… Number of messages to be sent. Default is 1<BR>-verbose …………… Turns on verbose mode</P> <P mce_keep=”true”> </P></FONT>