如题。接收到邮件内容为 --#BOUNDARY# Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit strtmp --#BOUNDARY#--
贴一段代码:
#include "stdafx.h"
#include <list>
#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>#include "SMailer/SMailer.h"
#include "MUtils/WinSockHelper.h"using namespace std;
void main()
{
MUtils::WinSockHelper wshelper; ifstream fin("C:\Documents and Settings\Administrator\桌面\html.htm.txt");
string strtmp;
vector<string>vect;
while( getline(fin,strtmp,'\n') )
{
vect.push_back(strtmp);
}
//sort(vect.begin(),vect.end());
vector<string>::iterator it = unique(vect.begin(),vect.end());
copy(vect.begin(),it,ostream_iterator<string>(cout,"\n")); //make sure the file 'boot.ini' is in the root directory on driver C
//SMailer::TextPlainContent content1("plain text content");
SMailer::TextHtmlContent content2("<a>strtmp</a>");
//SMailer::AppOctStrmContent content3("c:\\boot.ini");我是把邮件的HTML模块 放在本地文件中 然后通过把文件内容读到字符串中。 但是就是接收到邮件是--#BOUNDARY# Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit strtmp --#BOUNDARY#--
贴一段代码:
#include "stdafx.h"
#include <list>
#include <string>
#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>#include "SMailer/SMailer.h"
#include "MUtils/WinSockHelper.h"using namespace std;
void main()
{
MUtils::WinSockHelper wshelper; ifstream fin("C:\Documents and Settings\Administrator\桌面\html.htm.txt");
string strtmp;
vector<string>vect;
while( getline(fin,strtmp,'\n') )
{
vect.push_back(strtmp);
}
//sort(vect.begin(),vect.end());
vector<string>::iterator it = unique(vect.begin(),vect.end());
copy(vect.begin(),it,ostream_iterator<string>(cout,"\n")); //make sure the file 'boot.ini' is in the root directory on driver C
//SMailer::TextPlainContent content1("plain text content");
SMailer::TextHtmlContent content2("<a>strtmp</a>");
//SMailer::AppOctStrmContent content3("c:\\boot.ini");我是把邮件的HTML模块 放在本地文件中 然后通过把文件内容读到字符串中。 但是就是接收到邮件是--#BOUNDARY# Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit strtmp --#BOUNDARY#--
解决方案 »
- 关联DataGrid的问题
- 请问,你们对孙鑫的VC++视频教学有什么看法?
- 请教如何调用DrvEnablePDEV来获取显卡driver所提供的GDIINFO信息?
- CAxWindow的问题?
- 如何动态修改CLISTCTRL控件指定一行的背景和字体颜色
- 使用存储过程从多个表向一个表导数据
- 哪位高手知道如何在VC中动态创建数据库? 或者数据库的表格也行?
- 如何禁止菜单或工具条中的某一项??
- mfc中 cimage 用draw画图 显示不出来
- 简单问题,高分回报!!
- 多行CEdit,保持总行数不变,不断增加新行,删除旧行,出现滑动条不停地在开始和结束之间闪烁。
- 请问:无法定位程序输入点 PacketGetNetInfo 于动态链接库Packet.dll上 如何解决?
Content-Type: multipart/mixed; boundary=....