I'm trying to send the email from Notes which are of different domain mails. While sending an email i'm recieving an error "Error transfering to mail.target-domain.com; SMTP Protocol Returned a Permanent Error 554 5.7.1 <mail.my-domain.com: Access denied"
The configuration and the code level scripts are good and i don't see any error in code. Sometimes the mail send successfully, sometimes it throws such kind of error, sometimes if we retry to send email it sends.
I don't know where it throws an error
How to resolve this and why does this error appears?
It is not related to your script, it's a security configured in the server. You have to work with your admin to understand if the security is triggered because of the FROM/sender address, the recipient address, your IP, or more probably the combo of sendername/recipient , or the SMTP relaying from some IP to some other IP.
Also, if your script is in an agent, the sender address is often forged by the agent/server, and is not a valid one.