cURL / Mailing Lists / curl-library / Single Mail


SMTP Invalid Address (501 5.5.4)

From: Tom Sparrow <>
Date: Fri, 16 May 2014 23:22:07 +0900

Dear Members,

I am using libcurl to send email. In case when email sending machine's
hostname is not set or hostname is invalid. Some SMTP servers may
return error like following:

> EHLO 111 dd
< 501 5.5.4 Invalid Address
* Remote access denied: 501
* Closing connection 0

The email communication ultimately fails with ===> return code[9]:
Access denied to remote resource.

One of the obvious solution is setting the valid hostname and restart
email communication.

Can we have some fallback for trying out "EHLO" again with a
dummy valid hostname in case of EHLO failure with "501 5.5.4 Invalid
Address". This will ensure email delievery without reinitiatiating
complete email sending process.

Please provide your inputs.

Thanks and Regards
List admin:
Received on 2014-05-16