Send-Mail.ps1 v3.2 [7 November 2008]

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


No Commandline ………. This help text
-? …………………. This help text
-server &nbsp; .. Default is localhost. <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you specify “AutoDiscover” a Hub Transport Server <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default value will be set if not specified<BR>-body <TEXT>………… Message Body. <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default value will be set if not specified<BR>-attachment <PATH Filename and><BR>-msgcount <NUMBER>…… Number of messages to be sent.&nbsp; Default is 1<BR>-verbose ……………&nbsp; Turns on verbose mode</P> <P mce_keep=”true”>&nbsp;</P></FONT>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.