I am trying to send an email by using curl, but I am getting the error "Login Denied". I generated the app password as well as the oauth access token, but still getting the same error. Can someone guide me as to what's the issue.
That's how I gave the app password and the access token:
curl_easy_setopt(curl, CURLOPT_PASSWORD, "APP_PASSWORD");
headers = curl_slist_append(headers, "Authorization: Bearer ACCESS_TOKEN");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);