Link to home
Start Free TrialLog in
Avatar of csehz
csehzFlag for Hungary

asked on

PowerShell - New-InboxRule to answer each incoming mail with a specific text

Dear Experts,

We used to use PowerShell command to set InboxRule, for example forwading the incoming message to specific addresses in below syntax:

New-InboxRule -name "TestRuleForward" -mailbox "Bill.Smith@it.com" -ForwardTo 'Steve.Smith@it.com','John.Smith@it.com'

Could you please advise is it possible maybe to set a similiar rule, but which is answering each incoming message with a specific text?

thanks,
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

u mean that for example, every email that comes from "Bill.Smith@it.com", you want to forward to 'Steve.Smith@it.com','John.Smith@it.com', but also reply to 'Bill.Smith@it.com' with a message?
the basic idea is this:
Set-MailboxAutoReplyConfiguration -Identity Bill.Smith@it.com -AutoReplyState Enabled -ExternalMessage 'whatever' -InternalMessage 'whatever'

Open in new window

Avatar of csehz

ASKER

Thanks the answer,

Not exactly, the above syntax was just an example for the forwarding in using New-InboxRule, because that sure works for us.

The idea would be to set a kind of automatic reply to the sender, but which is Rule and not AutoReply.

Basically there is a case where a shared mailbox needs all mails answered back to a sender with a specific message. That can not be an AutoReply (so through Set-MailboxAutoReplyConfiguration), because that would not send back answer to the 2nd mail of the same sender. Just to his 1st one.
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of csehz

ASKER

Thanks I neither found any parameter which could specify a message for New-InboxRule