Send-MailMessage : Mailbox unavailable. The server response was: 5.7.60 SMTP
Hi all,
This forum really is my last option, cause I checked in the internet for a solution and was not able to find.
I have a hybrid exchange scenario – Exchange2019 + O365 – all the mailboxes are remote mailboxes (hosted in Office365) and we use Exchange2019 only to manage the features and SMTP Relay.
The point is that I am trying to send email from an specific mailbox using smtp relay and I am facing the issue below:
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.60 SMTP; Client does not have permissions to send as this sender
The .ps1 script that I’m using is below:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sendMailParams = @{
From = “donotreply @ mydomain.com”
To = “myname @ mydomain.com”
Subject = “Test mail from $env:Computername”
Body = “<p> *email sent for tests purposes* </p>”
SMTPServer = “smtp.mydomain.com”
Port = 587
Encoding = “UTF8”
}
Send-MailMessage @sendMailParams -BodyAsHtml -Credential $credential -UseSsl
After running the script, obviously I need to insert the credential then get the mentioned error.
Other details regarding my tests:
User inserted into ‘-Credential $credential’ part is something like “test@ mydomain.com”The receive conector is allowing the IP sourceThe receive connector is configured to listen port 587The receive connector is configured for SSL, Authentication and Exchange Users as wellThe relay must be done using SSL and Authentication (I can not use Anonymous)
The user test@ mydomain.com is already added as SEND AS into donotreply@ mydomain.com:
Any ideia what I should do to allow the test@ mydomain.com to send emails as donotreply@ mydomain.com using smtp relay?
Thanks in advance.
Hi all, This forum really is my last option, cause I checked in the internet for a solution and was not able to find.I have a hybrid exchange scenario – Exchange2019 + O365 – all the mailboxes are remote mailboxes (hosted in Office365) and we use Exchange2019 only to manage the features and SMTP Relay. The point is that I am trying to send email from an specific mailbox using smtp relay and I am facing the issue below: Send-MailMessage : Mailbox unavailable. The server response was: 5.7.60 SMTP; Client does not have permissions to send as this sender The .ps1 script that I’m using is below: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$sendMailParams = @{
From = “donotreply @ mydomain.com”
To = “myname @ mydomain.com”
Subject = “Test mail from $env:Computername”
Body = “<p> *email sent for tests purposes* </p>”
SMTPServer = “smtp.mydomain.com”
Port = 587
Encoding = “UTF8”
}
Send-MailMessage @sendMailParams -BodyAsHtml -Credential $credential -UseSsl After running the script, obviously I need to insert the credential then get the mentioned error. Other details regarding my tests:User inserted into ‘-Credential $credential’ part is something like “test@ mydomain.com”The receive conector is allowing the IP sourceThe receive connector is configured to listen port 587The receive connector is configured for SSL, Authentication and Exchange Users as wellThe relay must be done using SSL and Authentication (I can not use Anonymous) The user test@ mydomain.com is already added as SEND AS into donotreply@ mydomain.com: Any ideia what I should do to allow the test@ mydomain.com to send emails as donotreply@ mydomain.com using smtp relay? Thanks in advance. Read More