In line with the manpage, curl-config --libs should only provide the necessary library flags for the linker in order to compile software with libcurl. Also with this change, we match what the pkg-config file provides.
Set the conn->data->info.httpcode variable in smtp_statemach_act() to allow Curl_getinfo() to return the SMTP response code via the CURLINFO_RESPONSE_CODE action.
The intention is to take the output of curl's --libcurl option, as exercised in test 14xx, and generate a corresponding test15xx in which the generated code is compiled and run. This will verify that the generated code behaves equivalently to the original invocation of the curl command. The script is not yet integrated into the configure / makefile machinery.
This patch improves the output of curl's --libcurl option by generating code which builds curl_httppost and curl_slist lists, and uses symbolic names for enum and flag values. Variants of the my_setopt macro in tool_setopt.h are added in order to pass extra type information to the code-generation step in tool_setopt.c. If curl is configured with --disable-libcurl-option then the macros call curl_easy_setopt directly.
Curl_pop3_write() would drop the final CRLF of a message as it was considered part of the EOB as opposed to part of the message. Whilst the EOB sequence needs to be searched for by the function only the final 3 characters should be removed as per RFC-1939 section 3. Reported by: Rich Gray Bug: http://curl.haxx.se/mail/lib-2012-02/0051.html
Curl_smtp_escape_eob() would leave off final CRLFs from emails ending in multiple blank lines additionally leaving the smtpc->eob variable with the character count in, which would cause problems for additional emails when sent through multiple calls to curl_easy_perform() after a CURLOPT_CONNECT_ONLY.
Added information relating to the new CURLOPT_MAIL_AUTH parameter and reworked CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT to be a clearer. Fixed inconsistencies of "vocalisation of the abbreviation" versus "vocalisation of the first word" for all abbreviations. Corrected a typo in CURLOPT_NOPROXY.
Fixed the use of angled brackets "<>" in the optional AUTH parameter as per RFC-2554 section 5. The address should not include them but an empty address should be replaced by them.
Added a new CURLOPT_MAIL_AUTH option that allows the calling program to set the optional AUTH parameter in the MAIL FROM command. When this option is specified and an authentication mechanism is used to communicate with the mail server then the AUTH parameter will be included in the MAIL FROM command. This is particularly useful when the calling program is acting as a relay in a trusted environment and performing server to server communication, as it allows the relaying server to specify the address of the mailbox that was used to authenticate and send the original email.
Modify configure.ac to test for new CyaSSL Init function and remove default install path to system. Change to CyaSSL OpenSSL header and proper Init in code as well. Note that this no longer detects or works with CyaSSL before v2
Fixed incorrect behavior in smtp_done() which would cause the end of block data to be sent to the SMTP server if libcurl was operating in connect only mode. This would cause the server to return an error as data would not be expected which in turn caused libcurl to return CURLE_RECV_ERROR.
Fix the str2num() function to not check if the input string starts with a digit, since strtol() supports numbers prepended with '-' (and '+') too. This makes the --max-redirs option work as documented.