Hello,
We just changed our .net mailSettings to target a new smtp server but we experience the following issue when trying to send e-mail "Syntax error in parameters or arguments. The server response was: Syntactically invalid EHLO argument(s)"
I assume our parameters (userName, host, password and port) are correct as if we deploy the same app in another server, everything is working.
Can the name of the server where we have the issue (Machine Name contains underscore) be responsible for this Smtp Exception? If so, what should be the best way to fix it?
Thank you!
Edit:
We are using basic .net System.Net.Mail.SmtpClient such as
Client = new System.Net.Mail.SmtpClient(host, Convert.ToInt32(port))
{
Credentials = new NetworkCredential(username, password)
};
Client.Send(message); /*where message is an instance of MailMessage */
(host xx.xx.gridserver.com, userName [email protected], port 587)