open *smtp-server* 25 HELO MAIL FROM: *sender smtp address* RCPT TO: *recipient smtp address* SUBJECT: *subject* DATA *your mail text* *empty line*
$FolderPath = "/TEMP" $NewFolder = "CalendarTest" $PFRoot = "file://./backofficestorage/litwareinc.com/Public Folders" # Use PowerShell cmdlet to create new folder # (depending upon whether a root folder or not) if ($FolderPath -ne "") { $f = $FolderPath -replace("/", "\") New-PublicFolder -Name $NewFolder -Path $f } else { New-PublicFolder -Name $NewFolder } # Use ADO to change the folder type $o=New-Object -comobject ADODB.Record $updated=$false $timeout=60 while (($updated -eq $false) -and ($timeout -gt 0)) { $o.Open($PFRoot + $FolderPath + "/" + $NewFolder, "", 3, -1, -1, "", "") foreach($item in $o.Fields) { if($item.Name -eq "http://schemas.microsoft.com/exchange/outlookfolderclass") { $updated=$true $item.Value="IPF.Appointment" } } $o.Fields.Update() $o.Close() if ($updated -eq $false) { Start-Sleep -s 1 $timeout -- } }