www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18316] New: std.net.curl.SMTP.mailTo fails to compile

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

          Issue ID: 18316
           Summary: std.net.curl.SMTP.mailTo fails to compile
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: zan77137 nifty.com

Following code doesn't work:

-------
void main()
{
        // from example of https://dlang.org/phobos/std_net_curl.html#.SMTP
        import std.net.curl;

        // Send an email with SMTPS
        auto smtp = SMTP("smtps://smtp.gmail.com");
        smtp.setAuthentication("from.addr gmail.com", "password");
        smtp.mailTo = ["<to.addr gmail.com>"]; // <-- NG
        smtp.mailFrom = "<from.addr gmail.com>";
        smtp.message = "Example Message";
        smtp.perform();
}
------
$ dmd -run main
P:\app\dmd\bin64\..\import\std\net\curl.d(4055): Error: no property tempCString
for type const(char)[]
main.d(8): Error: template instance std.net.curl.SMTP.mailTo!() error
instantiat
ing
------

This is probably caused by this commit:
https://github.com/dlang/phobos/commit/ca0777a1a7a2ae9cc6f287a6fe8482e61047afb2
mailTo seems to be left out of these changes.

--
Jan 27 2018