$SmtpServer = "yourServer"\n$From = [email protected]\nif ($args.Length -lt 1) {\n     $To = [email protected]\n}\nelse {\n     $to = $args\n}\n$subject = "Need computer consulting"\n$Body = "Hi, this is John Doe I need cheap Exchange consulting at $125/hour"\n$smtpClient = new-object system.net.mail.smtpClient\n$smtpclient.host = $smtpServer\n$smtpclient.send($from, $to, $subject, $body)\n \n \nOnce this file is saved to ps1 format you can use it via this syntax\nTestMessage [email protected]