Mail Settings

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 years ago
Dear All,
While I am trying to send test email from Administration-> Configuration-> Common Settings-> Mail Settings

I received the following error:
[color=red]Mailbox name not allowed. The server response was: sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1)[/color]

Note: this message appears [color=red]ONLY AND ONLY IF[/color] I use an email that not under my domain name (e.g. yahoo email address)

thanks in advance
15 years ago
A lot of hosting companies do not allow open relay for email addresses outside of that domain.  So, you can't have your host to be set to yourdomain.com and send as [email protected].  This is to help prevent spammers free reign.   I would suggest setting up an email on your domain and having it redirect to your yahoo account if you are wanting to use that account.

Thanks,
WaltD
15 years ago
WaltDjr wrote:
A lot of hosting companies do not allow open relay for email addresses outside of that domain.  So, you can't have your host to be set to yourdomain.com and send as [email protected].  This is to help prevent spammers free reign.   I would suggest setting up an email on your domain and having it redirect to your yahoo account if you are wanting to use that account.

Thanks,
WaltD


Thank you WaltD,
Why I can use Microsoft Outlook (with same settings) to send and receive emails to/from any domain?

thenks,
15 years ago
Dear All,
I found a solution HERE

Thanks
15 years ago
On your mail settings you have the following:

Store Admin Email: [email protected]
Host:  mail.yourdomain.com
Port: 25
Username:  [email protected] or [email protected]????
Password: your password
15 years ago
LOL, oops, didn't see your solution message.
14 years ago
qais wrote:
Dear All,
I found a solution HERE

Thanks


Hello Qais or anybody else who can help me....

I have looked at the solution you provided, but I don't know exactly where to put that code from the article. I am a beginner in programming, so if you could help me out a bit, I would be very gratefull.

The error I get when emails have to be sent to customers is:
Error sending e-mail. Onjuiste reeks opdrachten. Het serverantwoord is: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.


Thanx in advance!
Monique Rodenburg
14 years ago
Monique wrote:
qais wrote:
Dear All,
I found a solution HERE

Thanks


Hello Qais or anybody else who can help me....

I have looked at the solution you provided, but I don't know exactly where to put that code from the article. I am a beginner in programming, so if you could help me out a bit, I would be very gratefull.

The error I get when emails have to be sent to customers is:
Error sending e-mail. Onjuiste reeks opdrachten. Het serverantwoord is: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server.


Thanx in advance!
Monique Rodenburg



Hi Monique Rodenburg,
This code is valid for NopCommerce1.10 and working 100%, I didn't try it in version 1.11

1. open the file NopCommerce1.10\Nop.Common\Messages\MessageManager.cs
2. put this code inside it

        const string SuccessCode = "+OK";

        const int TimeoutMs = 15 * 1000;

        static void DoPopAuth(string host, string user, string passphrase)
        {
            TcpClient cli = new TcpClient();
            cli.ReceiveTimeout = TimeoutMs;
            cli.SendTimeout = TimeoutMs;
            cli.Connect(host, 110);
            using (Stream peer = cli.GetStream())
            {
                StreamWriter wtr = new StreamWriter(peer); // ASCII?  
                Debug.Assert("\x000D\x000A" == wtr.NewLine, "CRLF!");
                StreamReader rdr = new StreamReader(peer); // ASCII?  
                String line;
                //  
                line = rdr.ReadLine();
                if (line == null)
                    throw new EndOfStreamException("Closed by peer at: Connect");
                Debug.WriteLine("Received: '{0}'", line);
                if (!line.StartsWith(SuccessCode, StringComparison.Ordinal))
                    throw new InvalidOperationException("Error at connect: '" + line + "'");
                // TODO check if host supports APOP. Regex(".*{<.*@.*>}");  
                //  
                wtr.WriteLine("USER {0}", user);
                wtr.Flush();
                line = rdr.ReadLine();
                if (line == null)
                    throw new EndOfStreamException("Closed by peer at: USER");
                Debug.WriteLine("Received: '{0}'", line);
                if (!line.StartsWith(SuccessCode, StringComparison.Ordinal))
                    throw new InvalidOperationException("Error on USER: '" + line + "'");
                //  
                wtr.WriteLine("PASS {0}", passphrase);
                wtr.Flush();
                line = rdr.ReadLine();
                if (line == null)
                    throw new EndOfStreamException("Closed by peer at: PASS");
                Debug.WriteLine("Received: '{0}'", line);
                if (!line.StartsWith(SuccessCode, StringComparison.Ordinal))
                    throw new InvalidOperationException("Error on PASS: '" + line + "'");
                // If we got here success!  
            }
        }


3. put this line of code
DoPopAuth(AdminEmailHost, AdminEmailUser, AdminEmailPassword);
before this line
smtpClient.Send(message);
14 years ago
Hello Qais!

Thank you for your quick reply! I am using version 1.11. I have looked for MessageManager.cs but this is not present in version 1.11.
I will try to find out where I have to put the line of code you suggested. I hope I can manage.

Kind regards,
Monique!
14 years ago
It is located in the source: /libraries/Nop.Common/Messages/
You have to rebuild Nop.Common after the changes
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.