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

Popular posts from this blog

DCOM received error "2147746132" from...

DFSR RPC replication errors 5014 1726 with large files over VPN

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B