cURL / Mailing Lists / curl-library / Single Mail


CURL SMTP - Bypass Authentication

From: Tom Sparrow <>
Date: Mon, 24 Mar 2014 22:19:31 +0900

Dear Members,

In case of relay server without authentication . I am getting error at
following location.

     lib/smtp.c - function smtp_perform_authentication()
     infof(conn->data, "No known authentication mechanisms supported!\n");
     result = CURLE_LOGIN_DENIED;

This occured when I have supplied dummy username and password with
curl_easy_setopt(curl, CURLOPT_USERPWD, userpasswordstring). (code works
fine without setting this, but I require this dummy user/password )

SMTP Server properties

- No Authentication

So to bypass authentication I have modified - >lib/smtp.c - function

Old Code
     infof(conn->data, "No known authentication mechanisms supported!\n");
      result = CURLE_LOGIN_DENIED;
Modified Code
   infof(conn->data, "Bypass Authentication. Try Anyway\n");
   state(conn, SMTP_STOP);
   result = CURLE_OK;

Now it works fine. I have doubt regarding side effect of this change.

Please give your inputs.

Thanks and Regards

List admin:
Received on 2014-03-24