Smtp client - from and to not send

Smtp client - from and to not send
void sendmail()
{
    write_command("MAIL FROM: <foo@bar.de>");
    write_command("RCPT TO: <foo@bar.de>");

    write_command("DATA");

    std::string data;
    data.append("MIME-Version: 1.0\r\n");
    data.append("From: <foo@bar.de>\r\n");
    data.append("To: <foo@bar.de>\r\n");
    data.append("Subject: Welcome\r\n");
    data.append("Date: Fri, 29 Dec 2017 09:30:00 -0400\r\n");
    data.append("\r\n"); //this seems to matter
    data.append("This is a test");
    data.append("\r\n.");
    write_command(data);

    write_command("QUIT");
}