![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | PSCX - Send-SmtpMail FYI, in the next drop of the PowerShell Community Extensions we will have a Send-SmtpMail cmdlet: 1# gcm Send-SmtpMail | fl Name : Send-SmtpMail CommandType : Cmdlet Definition : Send-SmtpMail [-SmtpHost <String>] [-PortNumber <Int32 >] [-Credential <PSCredential>] [-From <String>] -To < String[]> [-Cc <String[]>] [-Bcc <String[]>] [-Subject <String>] [-Body <String>] [-AttachmentPaths <String[ ]>] [-AttachmentLiteralPaths <String[]>] [-Timeout <In t32>] [-HtmlBody] [-Verbose] [-Debug] [-ErrorAction <A ctionPreference>] [-ErrorVariable <String>] [-OutVaria ble <String>] [-OutBuffer <Int32>] Send-SmtpMail [-SmtpHost <String>] [-PortNumber <Int32 >] [-Anonymous] [-From <String>] -To <String[]> [-Cc < String[]>] [-Bcc <String[]>] [-Subject <String>] [-Bod y <String>] [-AttachmentPaths <String[]>] [-Attachment LiteralPaths <String[]>] [-Timeout <Int32>] [-HtmlBody ] [-Verbose] [-Debug] [-ErrorAction <ActionPreference> ] [-ErrorVariable <String>] [-OutVariable <String>] [- OutBuffer <Int32>] Path : AssemblyInfo : DLL : C:\Program Files\PowerShell Community Extensions\PsCx. Snapin.dll HelpFile : PsCx.Snapin.dll-Help.xml ParameterSets : {Authenticated, Anonymous} ImplementingType : PsCx.Snapin.Commands.SendSmtpMailCommand Verb : Send Noun : SmtpMail It can be used like so: 3# Send-SmtpMail -SmtpHost smtp.org -Credential (get-credential) -From john_doe@foo.com -To jane_doe@bar.com -Subject "Test Subject" -Body @" >> Hi Jane, >> Wassup? >> -- >> John >> "@ >> or 4# Send-SmtpMail -To jane_doe@bar.com -Anonymous -Subject "Vacation Photos" -Body "Check these out" -AttachmentPaths *.jpg Note that the last example relies on some PSCX preference variables being set (PscxSmtpHostPreference and PscxSmtpFromPreference). -- Keith |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: PSCX - Send-SmtpMail looks promising keith. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Custom type error with PSCX under PS v2 CTP | JamieB | PowerShell | 7 | 11-08-2007 09:03 PM |
| PSCX - Send-SmtpMail probs | Neil Chambers | PowerShell | 4 | 06-22-2007 10:55 AM |
| PSCX 1.1 issues | Marco Shaw | PowerShell | 8 | 03-16-2007 10:48 PM |
| [PSCX] What happened to Get-CmdLetMaml | Joris van Lier | PowerShell | 2 | 03-11-2007 12:22 PM |
| PSCX 1.0 Released | Keith Hill [MVP] | PowerShell | 4 | 12-13-2006 10:06 AM |