email via powershell (specifically reply to)
hello,
similar .net method of sending email via powershell, there way specify alternate , reply-to address using cmdlet send-mailmessage? didn't see listed available parameter.
.net method
$emailfrom = "myfrom@mydomain.com"
$emailto = "myto@mydomain.com"
$subject = "mysubject"
$smtpserver = "mysmtp.mydomain.com"
$smtp = new-object net.mail.smtpclient($smtpserver)
$mailmessage = new-object net.mail.mailmessage($emailfrom, $emailto, $subject, $body)
$mailmessage.isbodyhtml = $true
$mailmessage.replyto = "myreply@du.edu"
$smtp.send($mailmessage)
thanks!
help send-mail not indicate -replyto parameter, think option may set -from parameter address want replies go to.
that said might possible come address value show different address (i.e. display name) in recipient's view of message 1 a reply go to. perhaps like:
"donald duck <mickey.mouse@disney.com>"
Windows Server > Windows PowerShell
Comments
Post a Comment