Aug 28 2016 09:02 PM
Aug 28 2016 09:02 PM
Hello All,
We are almost finishing the integration project with another email domain. We are planning to set up an automated response for 150+ users for their legacy email addresses.
How do we setup auto response when some one email them on their legacy email address for e.g. james.bond@abc.com to be auto responded as this email address no more exist please send email to james.bond@xyz.com?
this needs to be done for all 150 users. Any idea?
Aug 28 2016 09:50 PM
Aug 28 2016 10:30 PM
Thanks Santosh.
Looking at the drawback i dont think it will be a viable solution. As our requirement is to fire auto response from all 150 users. so Mail flow rule i guess not viable one. Coming back to powershell we want the rule to fire only when it hit legacy address of the email.
Thanks
Aug 28 2016 11:41 PM
Aug 28 2016 11:45 PM
Thanks Dan.
But that will not work as we need to give the senders the correct email address as well while replying back 🙂
Aug 29 2016 02:01 AM
SolutionYou can use the below script to get this done.
$NewdomainName="@xyz.com" $Mailboxs=get-mailbox -resultsize unlimited | Where { $_.RecipientTypeDetails -eq ‘LegacyMailbox’ } Foreach($Mailbox in $mailboxs) { $Message="email address no more exist please send email to"+$Mailbox.Alias+$NewdomainName Set-MailboxAutoReplyConfiguration -Identity $Mailbox.Identity -AutoReplyState scheduled -InternalMessage $Message -ExternalMessage $Message }
Feb 16 2021 10:09 PM
HI Santhosh, I saw your script of Autoreply, It is simple and time saving, appreciated. However, I have a question, Can this script be customized to take input from csv file? e.g. I create a csv file and in one column I put old email address and 2nd column I put new email address and auto reply would state that " Dear Sender, please note that email ID of OLD email address has been changed to NEW email address" and script will run for all users in this CSV file.
Looking forward your assistance. Thanks in advance. Your old script is as below;
_________________________________________________________
$NewdomainName="@xyz.com"
$Mailboxs=get-mailbox -resultsize unlimited | Where { $_.RecipientTypeDetails -eq ‘LegacyMailbox’ }
Foreach($Mailbox in $mailboxs)
{
$Message="email address no more exist please send email to"+$Mailbox.Alias+$NewdomainName
Set-MailboxAutoReplyConfiguration -Identity $Mailbox.Identity -AutoReplyState scheduled -InternalMessage $Message -ExternalMessage $Message
}
_________________________________________________________
Aug 29 2016 02:01 AM
SolutionYou can use the below script to get this done.
$NewdomainName="@xyz.com" $Mailboxs=get-mailbox -resultsize unlimited | Where { $_.RecipientTypeDetails -eq ‘LegacyMailbox’ } Foreach($Mailbox in $mailboxs) { $Message="email address no more exist please send email to"+$Mailbox.Alias+$NewdomainName Set-MailboxAutoReplyConfiguration -Identity $Mailbox.Identity -AutoReplyState scheduled -InternalMessage $Message -ExternalMessage $Message }