501 5.5.4 syntax error in parameters scanning lỗi gì

I'm testing my email client and I sent email for multiple servers, like outlook, gmail and guerrila email, but I receive 501: 5.5.4 as response. From what I understand it is some syntax error on my side, but I can't find it.

This is my test email:

MIME-Version: 1.0
From: [email protected]
To: [email protected]
Date: Sat, 21 Jan 2023 19:49:58 +0000
Subject: test
Message-ID: <[email protected]>
Content-Type: multipart/mixed; boundary=87c47e1058b725db9b21bdecfb31391382ed3f4034dbc921fb183c13a3b2
--87c47e1058b725db9b21bdecfb31391382ed3f4034dbc921fb183c13a3b2
Content-Type: text/plain; charset="UTF-8"
test
--87c47e1058b725db9b21bdecfb31391382ed3f4034dbc921fb183c13a3b2--

This is the email body, I used Golang net/smtp SendMail function to send it. What is wrong in this?

If you can find out the specific cause of the syntax error that would be the best place to start. For example, by default the gateway will reject 8bit (non-ascii) characters in the mail from. In some cases you may be able to make a configuration change to remedy. You can use tcpdump to capture the traffic specifically from the host that has been causing the 5.5.2's and drill in from there.

Good luck.

  • 3. RE: Message rejected with: Remote host said: 501 5.5.2 MAIL FROM syntax error

    Best Answer
    501 5.5.4 syntax error in parameters scanning lỗi gì
    Posted Apr 30, 2010 09:44 AM We found it out. We had an "_" in the sender email address. This is not FRC conform.
  • 4. RE: Message rejected with: Remote host said: 501 5.5.2 MAIL FROM syntax error

    501 5.5.4 syntax error in parameters scanning lỗi gì
    Posted Apr 30, 2010 10:20 AM Contonso, there may be some options available to help you with this. Please contact product support if you are interested further in fixing this. We have a mailing feature in our Wicket 6 Web Application. Recently, I had to change the credentials of the mailing server to a new one. I tested it on my local system (OS Windows, Tomcat 7 web server) and it worked perfectly fine. The mail was send and I received it. When I applied the same credentials on our web server (OS: Debian) I get the following error message: 501 - Syntax error in parameters or arguments I checked the mail address multiple times but everything seems to be fine. Thus, I am guessing that maybe the message is blocked somehow on the server either from the tomcat 7, the apache 2 or the hoster (although I called the hoster and they told me that their firewall is not blocking any outgoing signals). However, with the old credentials the mailing service is running perfectly fine. Thus not all outgoing signals are blocked. I am not very experienced with such server configurations. Can anybody please give me a hint where I have to check the configuration. Thank you for your support. EDIT For sending the mail we are using the embedded javamail service of the spring framework. The code looks like this: