www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13042] New: std.net.curl.SMTP doesn't send emails with

https://issues.dlang.org/show_bug.cgi?id=13042

          Issue ID: 13042
           Summary: std.net.curl.SMTP doesn't send emails with
                    libcurl-7.34.0 or newer
           Product: D
           Version: unspecified
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: brocolis eml.cc

libcurl-7.34.0 was released on December 17 2013 [1]. Starting with this
version, SMTP requires CURLOPT_UPLOAD option [2]. If CURLOPT_UPLOAD option is
not set, libcurl emits VRFY command and no email is sent. [3]

[1] http://curl.haxx.se/changes.html#7_34_0

[2]
https://github.com/bagder/curl/commit/dac01ff6d788b20e5674e018a79f8a965b1e52bb#diff-65cc11e82be15630f137b0476644a46bL1668
[2]
https://github.com/bagder/curl/commit/73a894170bce99ed71fcc764422f52a7cc4d3815
[2] http://curl.haxx.se/libcurl/c/smtp-tls.html
[2] http://curl.haxx.se/libcurl/c/smtp-multi.html
[2] http://curl.haxx.se/libcurl/c/smtp-ssl.html
[2] http://curl.haxx.se/libcurl/c/smtp-mail.html

[3] http://curl.haxx.se/libcurl/c/smtp-vrfy.html

Fix:
- Add 'p.curl.set(CurlOption.upload, 1L);' to std.net.curl.SMTP.initialize
or
- Add 'smtp.handle.set(CurlOption.upload, 1);' to user code. Example.
auto smtp = SMTP("smtps://smtp.gmail.com");
smtp.handle.set(CurlOption.upload, 1);
...
smtp.perform();

--
Jul 04 2014