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, base64)
- error handling
## Examples
Lets see a simple example:
```c++
#include <QtGui/QApplication>
#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 - Tőkés Attila**
没有合适的资源?快使用搜索试试~ 我知道了~
在Qt中发送邮件的库。
共41个文件
cpp:17个
h:14个
pro:5个
需积分: 5 13 下载量 144 浏览量
2022-08-09
09:45:57
上传
评论
收藏 129KB ZIP 举报
温馨提示
发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库发送邮件的库
资源详情
资源评论
资源推荐
收起资源包目录
SmtpClient-for-Qt-v1.1.zip (41个子文件)
SmtpClient-for-Qt-v1.1
demos
demo2
sendemail.cpp 3KB
demo2.pro 786B
demo2.cpp 791B
sendemail.ui 8KB
printscreen.png 84KB
sendemail.h 995B
demo3
demo3.pro 715B
demo3.cpp 2KB
demo1
demo1.cpp 1KB
demo1.pro 716B
demo4
demo4.pro 715B
demo4.cpp 2KB
SMTPEmail.pro 1KB
LICENSE 26KB
src
mimemultipart.h 2KB
mimehtml.h 1KB
mimeattachment.h 1KB
SmtpMime 897B
mimepart.cpp 4KB
quotedprintable.cpp 2KB
emailaddress.cpp 1KB
mimecontentformatter.cpp 2KB
mimefile.cpp 1KB
mimeinlinefile.h 1KB
smtpclient.h 4KB
mimemessage.h 2KB
mimeattachment.cpp 1KB
quotedprintable.h 1008B
emailaddress.h 1KB
mimetext.h 1KB
mimemessage.cpp 8KB
mimepart.h 2KB
mimeinlinefile.cpp 1KB
mimehtml.cpp 1KB
smtpclient.cpp 12KB
mimemultipart.cpp 2KB
mimefile.h 1KB
mimetext.cpp 1KB
mimecontentformatter.h 1KB
smtpexports.h 179B
README.md 2KB
共 41 条
- 1
我啥都会
- 粉丝: 425
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 筷手引流工具.apk
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0