SmtpClient

所属分类:Linux/Unix编程
开发工具:QT
文件大小:129KB
下载次数:84
上传日期:2013-08-11 10:49:59
上 传 者dunxi
说明:  QT SMTP 发送邮件 只要简单配置下,就可以发送邮件了 配置内容: 1. 指定 SMTP的服务器 2. 指定发件人的用户名(一般都是邮箱),密码 3. 指定发件人(同2中的发件人),收件人(可多个),主题,正文,附件,点击发送按钮,即可发送 4. 内附了很多Demo代码,供大家参考,非常的容易
(QT SMTP to send mail)

文件列表:
SmtpClient\demos\demo1.cpp (1313, 2013-04-26)
SmtpClient\demos\demo2\demo2.cpp (841, 2013-04-26)
SmtpClient\demos\demo2\printscreen.png (85756, 2013-04-26)
SmtpClient\demos\demo2\sendemail.cpp (3206, 2013-04-26)
SmtpClient\demos\demo2\sendemail.h (1046, 2013-04-26)
SmtpClient\demos\demo2\sendemail.ui (8667, 2013-04-26)
SmtpClient\demos\demo3.cpp (1827, 2013-04-26)
SmtpClient\demos\demo4.cpp (2111, 2013-04-26)
SmtpClient\Examples.md (4904, 2013-04-26)
SmtpClient\Home.md (1079, 2013-04-26)
SmtpClient\LICENSE (27023, 2013-04-26)
SmtpClient\SMTPEmail.pro (1079, 2013-04-26)
SmtpClient\src\demo2.cpp (841, 2013-04-26)
SmtpClient\src\emailaddress.cpp (1307, 2013-04-26)
SmtpClient\src\emailaddress.h (1351, 2013-04-26)
SmtpClient\src\main.cpp (2854, 2013-04-26)
SmtpClient\src\mimeattachment.cpp (1096, 2013-04-26)
SmtpClient\src\mimeattachment.h (1109, 2013-04-26)
SmtpClient\src\mimecontentformatter.cpp (1816, 2013-04-26)
SmtpClient\src\mimecontentformatter.h (1116, 2013-04-26)
SmtpClient\src\mimefile.cpp (1297, 2013-04-26)
SmtpClient\src\mimefile.h (1187, 2013-04-26)
SmtpClient\src\mimehtml.cpp (1209, 2013-04-26)
SmtpClient\src\mimehtml.h (1245, 2013-04-26)
SmtpClient\src\mimeinlinefile.cpp (1127, 2013-04-26)
SmtpClient\src\mimeinlinefile.h (1169, 2013-04-26)
SmtpClient\src\mimemessage.cpp (6360, 2013-04-26)
SmtpClient\src\mimemessage.h (2243, 2013-04-26)
SmtpClient\src\mimemultipart.cpp (2183, 2013-04-26)
SmtpClient\src\mimemultipart.h (1902, 2013-04-26)
SmtpClient\src\mimepart.cpp (4366, 2013-04-26)
SmtpClient\src\mimepart.h (2366, 2013-04-26)
SmtpClient\src\mimetext.cpp (1338, 2013-04-26)
SmtpClient\src\mimetext.h (1244, 2013-04-26)
SmtpClient\src\quotedprintable.cpp (2015, 2013-04-26)
SmtpClient\src\quotedprintable.h (1009, 2013-04-26)
SmtpClient\src\sendemail.cpp (6099, 2013-04-26)
SmtpClient\src\sendemail.h (1120, 2013-04-26)
SmtpClient\src\sendemail.ui (9000, 2013-04-26)
... ...

SMTP Client for Qt (C++) - Version 1.1 ============================================= The SmtpClient for Qt is small library writen for Qt 4 (C++ version) that allows application to send complex emails (plain text, html, attachments, inline files, etc.) using the Simple Mail Transfer Protocol (SMTP). ##New in version 1.1: - TLS (STARTTLS) connection is now supported - multiple types of recipients (to, cc, bcc) - nested mime emails (mixed/alternative, mixed/related) - output compilant with RFC2045 ## SMPT Client for Qt supports - TCP and SSL connections to SMTP servers - SMTP authentication (PLAIN and LOGIN methods) - sending MIME emails (to multiple recipients) - plain text and HTML (with inline files) content in emails - multiple attachments and inline files (used in HTML) - different character sets (ascii, utf-8, etc) and encoding methods (7bit, 8bit, base***) - error handling ## Examples Lets see a simple example: ```c++ #include #include "../src/SmtpMime" int main(int argc, char *argv[]) { QApplication a(argc, argv); // This is a first demo application of the SmtpClient for Qt project // First we need to create an SmtpClient object // We will use the Gmail's smtp server (smtp.gmail.com, port 465, ssl) SmtpClient smtp("smtp.gmail.com", 465, SmtpClient::SslConnection); // We need to set the username (your email address) and the password // for smtp authentification. smtp.setUser("your_email_address@gmail.com"); smtp.setPassword("your_password"); // Now we create a MimeMessage object. This will be the email. MimeMessage message; message.setSender(new EmailAddress("your_email_address@gmail.com", "Your Name")); message.addRecipient(new EmailAddress("recipient@host.com", "Recipient's Name")); message.setSubject("SmtpClient for Qt - Demo"); // Now add some text to the email. // First we create a MimeText object. MimeText text; text.setText("Hi,\nThis is a simple email message.\n"); // Now add it to the mail message.addPart(&text); // Now we can send the mail smtp.connectToHost(); smtp.login(); smtp.sendMail(message); smtp.quit(); } ``` For more examples see the [Wiki/Examples](https://github.com/bluetiger9/SmtpClient-for-Qt/wiki/Examples). ## License This project (all files including the demos/examples) is licensed under the GNU LGPL, version 2.1. **Copyright (c) 2011 - Tokes Attila**

近期下载者

相关文件


收藏者