一个简单MAPI客户程序


日期: 2002-02-17 14:00 | 联系我
关注我: Telegram, Twitter

本程序编写了一个类CIMapi,用于在应用程序中插入发送邮件的功能,参考下面的一个应用:

#include <mapi.h> #include "imapi.h" void CBugReport::OnOK() { CIMapi mail; mail.To("UltraMaroon@email.msn.com"); // Set recipient name mail.To("someoneelse@somewhereelse.com"); // Second recipient mail.Cc("cc@cc.com"); // CC recipient // Identify sender (not strictly necessary since MAPI will fill this in for you) mail.From("user@somewhere.com"); mail.Subject("Test Email"); // Subject of this email mail.Attach("somefilename"); // Attaching a file // Attach another file but give it a different name inside the email itself mail.Attach("someotherfile", "different_name_for_recipient"); // Put text of message in body mail.Text("Body text for this email"); // Set body text mail.Send(); // Now send the mail! CDialog::OnOK(); }

>>> DOWN !!! >>>下载源代码及演示程序


 文章评论
目前没有任何评论.

↓ 快抢占第1楼,发表你的评论和意见 ↓

当前页面是本站的 百度 MIP 版本。
欲查看完整版本和发表评论请点击:完整版 »

 

程序员小辉 建站于 1997
Copyright © XiaoHui.com; 保留所有权利。