C++ CSmtp 发送邮件
支持SSL和TLS,如可以使用Gmail账户发送邮件
纯C++,同时支持Windows和Linux
简单易用的API
本例可以直接用Visual Studio 2010加载
CSmatp mail;
mail.SetLogin("***");
mail.SetPassword("***");
mail.SetSenderName("User");
mail.SetSenderMail("user@domain.com");
mail.SetReplyTo("user@domain.com");
mail.SetSubject("The message");
mail.AddRecipient("friend@domain2.com");
mail.SetXPriority(XPRIORITY_NORMAL);
mail.SetXMailer("The Bat! (v3.02) Professional");
mail.AddMsgLine("Hello,");
mail.AddMsgLine("...");
mail.AddMsgLine("How are you today?");
mail.AddMsgLine("Regards");
mail.ModMsgLine(5,"regards");
mail.AddMsgLine("User");
mail.AddAttachment("../test1.jpg");
mail.AddAttachment("c:\\test2.exe");
mail.Send();
1