curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Support of User/ Email address with 3 dots after @

From: Knud Pehrs via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 25 Aug 2020 13:00:39 +0000

Hello,

currently we use libcurl 7.71.0.
Does libcurl support email addresses like firstname.name_at_part1.part2.part3.com<mailto:firstname.name_at_part1.part2.part3.com> ?

We have a communication library with following code snipped which worked fine so far:
      if (m_curl)
      {
        CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_USERNAME, m_username.c_str());
        CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_PASSWORD, m_password.c_str());
        if (m_ssl == SendHelper::SSLConnection::SSL_ENABLED)
        {
          CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_URL, std::string{ "pop3s://" + m_server }.c_str());
          const auto result = CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
          if (result != CURLE_OK)
          {
            LOG4CXX_ERROR(m_logger, "Using SSL/TLS while opening mailbox failed: " << curl_easy_strerror(result));
            throw MailboxOpenException(result, curl_easy_strerror(result));
          }
        }
        else
        {
          CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_URL, std::string{ "pop3://" + m_server }.c_str());
          CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_USE_SSL, CURLUSESSL_NONE);
        }
        auto listingWriter = CurlWriter{};
        CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_WRITEFUNCTION, curlWriteCallback);
        CurlUtilities::curl_easy_setopt(m_logger, m_curl, CURLOPT_WRITEDATA, (void*)&listingWriter);

        const auto result = curl_easy_perform(m_curl);

        if (result != CURLE_OK)
        {
          LOG4CXX_ERROR(m_logger, "Listing of mailbox contents failed: " << curl_easy_strerror(result));
          throw MailboxOpenException(result, curl_easy_strerror(result));
        }

When we use an email (with 3 dots after @) like the one above we get the error message "Listing of mailbox contents failed:
So far we could not reproduce this behaviour because the email was used by a customer. Before, the customer used an email with 2 dots after @ and it worked. But since the customer changed to the new email address it is not possible to open the mailbox.

Any suggestions?

regards
Mr. Knud Pehrs

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-08-25