CURLOPT_MAIL_RCPT_ALLLOWFAILS.3 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .\"
  23. .TH CURLOPT_MAIL_RCPT_ALLLOWFAILS 3 "16 Jan 2020" "libcurl 7.69.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_MAIL_RCPT_ALLLOWFAILS \- allow RCPT TO command to fail for some recipients
  26. .SH SYNOPSIS
  27. .nf
  28. #include <curl/curl.h>
  29. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MAIL_RCPT_ALLLOWFAILS,
  30. long allow);
  31. .SH DESCRIPTION
  32. If \fIallow\fP is set to 1L, allow RCPT TO command to fail for some recipients.
  33. When sending data to multiple recipients, by default curl will abort SMTP
  34. conversation if at least one of the recipients causes RCPT TO command to
  35. return an error.
  36. The default behavior can be changed by setting \fIignore\fP to 1L which will
  37. make curl ignore errors and proceed with the remaining valid recipients.
  38. If all recipients trigger RCPT TO failures and this flag is specified, curl
  39. will still abort the SMTP conversation and return the error received from to
  40. the last RCPT TO command.
  41. .SH DEFAULT
  42. 0
  43. .SH PROTOCOLS
  44. SMTP
  45. .SH EXAMPLE
  46. .nf
  47. CURL *curl = curl_easy_init();
  48. if(curl) {
  49. struct curl_slist *list;
  50. /* Adding one valid and one invalid email address */
  51. list = curl_slist_append(NULL, "person@example.com");
  52. list = curl_slist_append(list, "invalidemailaddress");
  53. curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
  54. curl_easy_setopt(curl, CURLOPT_MAIL_RCPT_ALLLOWFAILS, 1L);
  55. ret = curl_easy_perform(curl);
  56. curl_slist_free_all(list);
  57. curl_easy_cleanup(curl);
  58. }
  59. .fi
  60. .SH AVAILABILITY
  61. Added in 7.69.0.
  62. .SH RETURN VALUE
  63. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  64. .SH "SEE ALSO"
  65. .BR CURLOPT_MAIL_FROM "(3), " CURLOPT_MAIL_RCPT "(3), "