Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Error while sending mail " Atmail Could not send message to SMTP server "  (Read 2930 times)

0 Members and 2 Guests are viewing this topic.

sumesh

  • Guest

Recently When I switch my mail server to Atmail from horde I am getting the following error :

"Could not send message to SMTP server. Check you have access to send messages via the server and that all To/CC/BCC addresses are valid\nError: SMTP Server rejected email. Returned:553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) "

Cause : It is due to the Atmail didn't authenticate when trying to send the email.

So here's the way I fixed it:

Open the file /var/www/atmail/libs/Atmail/SendMsg.php

Search for the line "// Optionally authenticate with the SMTP server"

Add bellow:

              $auth =& $atmail->getAuthObj();
              $pref['smtpauth_username'] = $auth->Account;
               $pref['smtpauth_password'] = $auth->password;


That's it. This will override the auth settings from Config.php with the credentials the user used to log in.

Thank You for the time to read it, hope this will help you :) :)