examples: Standardised username and password settings for all email examples

Replaced the use of CURLOPT_USERPWD for the preferred CURLOPT_USERNAME
and CURLOPT_PASSWORD options and used the same username and password for
all email examples which is the same as that used in the test suite.
This commit is contained in:
Steve Holme
2014-01-04 18:10:18 +00:00
parent 84a9f092dc
commit 5220c1d692
13 changed files with 41 additions and 29 deletions

View File

@@ -36,7 +36,8 @@ int main(void)
curl = curl_easy_init();
if(curl) {
/* Set username and password */
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
/* This is mailbox folder to select */
curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");