我有一个smtp客户端生成在c + +我可以发送电子邮件到我的测试mailtrap帐户。 标题发送和电子邮件到达很好。Smtp客户端 - 从和不发送
我的问题是,从/到指示该字段为空 - 所显示的截图
我送头与
write_command("MAIL FROM: <[email protected]>");
write_command("RCPT TO: <[email protected]>");
我用我的Smtp客户端的完整代码做了一个要点
https://gist.github.com/anonymous/7bb13de7f044bcb5d07d0e6a9d991ea9
我从我的main()
函数调用它
与
Smtp smtp_client = Smtp();
smtp_client.new_connection("smtp.mailtrap.io", 25);
smtp_client.auth_login("username", "password");
smtp_client.sendmail();
smtp_client.close_connection();
感谢黏合看看
我想我它。我编辑了答案。 –