Chilkat 是一个很好的开源站点,有各种开源库。

开发语言主要有Classic ASPC
C++C#Delphi ActiveXDelphi DLLVisual FoxProJavaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerShellPythonRubySQL ServerUnicode CUnicode C++Visual Basic 6.0VB.NETVBScript

而它支持的平台则有:

MS Visual C/C++

Linux/CentOS/Heroku C/C++

MAC OS X C/C++

C++ Builder

Solaris C/C++

iOS C/C++

Android C/C++

Raspberry Pi C/C++

Embedded Linux C/C++

(ARM, MIPS, PowerLinux)

FreeBSD C/C++

HP-UX C/C++

MinGW C/C++

Chilkat 主页:http://www.chilkatsoft.com/

开发包下载连接:http://www.chilkatsoft.com/downloads.asp 这里能够依据你的须要下载不同版本号的开发包。

以下我就以win7 x64 + VS2010 C/C++开发一个邮件发送程序样例,做个教程:

首先下载开发包:

一、打开开发包下载页面:http://www.chilkatsoft.com/downloads.asp

选择 Download Chilkat C / C++ Libraries,如图:

点击后进入了。http://www.chilkatsoft.com/downloads_CPP.asp。假设你的其它平台请自行选择,我的是windows 所以我选择例如以下:

点击进去后就是开发版本号的选择了,不要着急向下滑动,选择你须要的开发包。我的是VS2010 我的选择例如以下:

下载后。将他解压到一个目下。我解压到我的D盘,解压的文件有三个。include,libs,license.txt如图,

----------------------------------------------------------------------------------

二、接下来就是配置我们的VS2010了

过程例如以下:

1、创建一个測试project:

2、加入包括头文件,刚才解压在D盘还记得吗?呵呵:

3、加入lib库我这里拿ChilkatDbg.lib演示,还要加入其它的库哟!完整的例如以下

crypt32.lib

ws2_32.lib

D:\chilkat-9.5.0-x86-vc10\libs\ChilkatDbg.lib

3.加入实例代码。我这里直接贴出来:

//官网上关于邮件发送的说明文档连接:http://www.example-code.com/cpp/mht_emailHtmlFile.asp

//关于邮件开发文档:http://www.example-code.com/cpp/smtp.asp

//这里有很多开发样例。点击左边的选择框。就能看到不同方法,然后点击自己想要的样例就能够了。

//CKMailTest.cpp

#include "stdafx.h"



#include<stdio.h>

#include<stdlib.h>



#include "../include/CkMailMan.h"

#include "../include/CkEmail.h"

#include "../include/CkMht.h"

void ChilkatSample(void)
{
// The mailman object is used for sending and receiving email.
CkMailMan mailman; // Any string argument automatically begins the 30-day trial.
bool success;
success = mailman.UnlockComponent("30-day trial");
if (success != true) {
printf("%s\n",mailman.lastErrorText());
return;
} // Set the SMTP server.
mailman.put_SmtpHost("smtp.chilkatsoft.com"); // Set the SMTP login/password (if required)
mailman.put_SmtpUsername("myUsername");
mailman.put_SmtpPassword("myPassword"); // Create a new email object
CkEmail email; email.put_Subject("This is a test");
email.put_Body("This is a test");
email.put_From("Chilkat Support <support@chilkatsoft.com>");
email.AddTo("Chilkat Admin","admin@chilkatsoft.com");
// To add more recipients, call AddTo, AddCC, or AddBcc once per recipient. // Call SendEmail to connect to the SMTP server and send.
// The connection (i.e. session) to the SMTP server remains
// open so that subsequent SendEmail calls may use the
// same connection.
success = mailman.SendEmail(email);
if (success != true) {
printf("%s\n",mailman.lastErrorText());
return;
} // Some SMTP servers do not actually send the email until
// the connection is closed. In these cases, it is necessary to
// call CloseSmtpConnection for the mail to be sent.
// Most SMTP servers send the email immediately, and it is
// not required to close the connection. We'll close it here
// for the example:
success = mailman.CloseSmtpConnection();
if (success != true) {
printf("Connection to SMTP server not closed cleanly.\n");
} printf("Mail Sent!\n");
}

int _tmain(int argc, _TCHAR* argv[])

{

ChilkatSample();//直接调用

return 0;

}

Chilkat----开源站点之VS2010 CKMailMan一个很好的邮件发送开源开发包的更多相关文章

  1. 基于开源项目的在线网络视频直播项目---一个很好的电视直播开源项目Sopcast

    http://blog.csdn.net/roy_xu/article/details/2216559 http://115.com/?ct=rar&pickcode=ew52634xr2cr ...

  2. 分享一个Fluent风格的邮件发送封装类

    C#中用SmtpClient发邮件很简单,闲着无事,简单封装一下 IEmailFactory public interface IEmailFactory { IEmailFactory SetHos ...

  3. 一个很好的开源视频播放器GiraffePlayer2(支持rtmp,rtsp,http,https)

    一个很好的开源视频播放器GiraffePlayer2(支持rtmp,rtsp,http,https) https://github.com/tcking/GiraffePlayer2 GiraffeP ...

  4. libCURL开源库在VS2010环境下编译安装,配置详解

    libCURL开源库在VS2010环境下编译安装,配置详解 转自:http://my.oschina.net/u/1420791/blog/198247 http://blog.csdn.net/su ...

  5. Makefile经典教程(一个很棒很清晰的讲解)【转】

    转自:https://blog.csdn.net/seven_amber/article/details/70216216 该篇文章为转载,是对原作者系列文章的总汇加上标注. 支持原创,请移步陈浩大神 ...

  6. Druid:一个用于大数据实时处理的开源分布式系统

    Druid是一个用于大数据实时查询和分析的高容错.高性能开源分布式系统,旨在快速处理大规模的数据,并能够实现快速查询和分析.尤其是当发生代码部署.机器故障以及其他产品系统遇到宕机等情况时,Druid仍 ...

  7. 一个很cool的C#的高性能数学库

    High Performance Math Library for C# and .NET是一个很cool的C#的高性能数学库,3D效果也很不错,下图是首页上的一个例子.他也有一个交互的网页,你可以自 ...

  8. FluentConsole是一个托管在github的C#开源组件

    FluentConsole是一个托管在github的C#开源组件 阅读目录 1.控制台能有啥滑头? 2.FluentConsole基本介绍 3.使用介绍 4.资源 从该系列的第一篇文章 .NET平台开 ...

  9. 安利一个很火的 Github 滤镜项目

    安利一个很火的 Github 滤镜项目 园长 1 个月前 简评:通过深度学习,一秒钟让你的照片高大上,这是康奈尔大学和 Adobe 的工程师合作的一个新项目,通过卷积神经网络把图片进行风格迁移.项目已 ...

随机推荐

  1. 勒索软件Locky、Tesalcrypt等使用了新的工具躲避检测

    勒索软件Locky.Tesalcrypt等使用了新的工具躲避检测 今天我们发现Locky勒索软件家族使用一种新的工具来躲避检测,并且可能已经感染了很多节点. 自从我们通过AutoFocus智能威胁分析 ...

  2. Python 优雅获取本机 IP 方法

    原文 见过很多获取服务器本地IP的代码,个人觉得都不是很好,例如以下这些 不推荐:靠猜测去获取本地IP方法 #!/usr/bin/env python # -*- coding: utf-8 -*- ...

  3. apache虚拟主机配置及常用安全配置

    环境准备: 服务器系统:CentOS 6.5 安装lamp环境: yum -y install mysql mysql-server php php-mysql httpd php-gd* freet ...

  4. JPA 菜鸟教程 15 继承-一个表-SINGLE_TABLE

    原地址:http://blog.csdn.net/JE_GE/article/details/53678422 继承映射策略 一个类继承结构一个表的策略,最终只生成一个表,这是继承映射的默认策略. 举 ...

  5. javascript设计模式----桥接模式、组合模式、装饰者模式、享元模式

    http://blog.csdn.net/painsonline/article/details/7215087    桥接模式:http://www.cnblogs.com/TomXu/archiv ...

  6. Java基础89 MySQL存储过程

    1.MySQL存储过程   1.1.什么是存储过程 带有逻辑的sql语句:带有流程控制语句(if  while)等等 的sql语句   1.2.存储过程的特点 1)执行效率非常快,存储过程是数据库的服 ...

  7. POJ 1948 Triangular Pastures

    题意: 把很多单独的线段重新组合成一个三角形,使得三角形面积最大(所有的线段都必须用上). 思路: 三角形的任意一条边的边长不能超过周长的一半,只需要用dp枚举两条边j,k,剩下的一条边长为tot  ...

  8. 【论文阅读】Learning Spatial Regularization with Image-level Supervisions for Multi-label Image Classification

    转载请注明出处:https://www.cnblogs.com/White-xzx/ 原文地址:https://arxiv.org/abs/1702.05891 Caffe-code:https:// ...

  9. .NetCore使用Swagger进行单版本或多版本控制处理

    前面已经介绍过了Swagger的基础使用了 下面继续分别详细说明下 不添加版本控制以及添加版本控制的使用情况,其实也基本一致,对看起来可能更加容易理解 第一步 导入nuget包 nuget导入Swas ...

  10. 表达式树(Expression Tree)

    饮水思源 本文并非原创而是下面网址的一个学习笔记 https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/e ...