Windows mobile PPC 下利用 tmail.exe 发送短信、彩信、邮件
2010-03-18 21:22:00 来源:WEB开发网 闂傚倸鍊搁崐鎼佸磹閹间礁纾瑰瀣椤愯姤鎱ㄥ鍡楀幊缂傚倹姘ㄩ幉绋款吋閸澀缃曢梻鍌欑濠€閬嶆惞鎼淬劌绐楅柡宥庡亞娑撳秵銇勯弽顐沪闁绘挶鍎甸弻锝夊即閻愭祴鍋撻崷顓涘亾濮樼偓瀚�

return TMAIL_PARAMETER_ERROR;
}
CString strContent,strTmp,strFormat;
strContent = _T("-service \"ActiveSync\"");
if (tData.lpTo != NULL)
{
strTmp = tData.lpTo;
if (!strTmp.IsEmpty())
{
strTmp.Replace(_T("\""),_T("\\""));
strFormat.Format(_T(" -to \"%s\""),strTmp);
strContent += strFormat;
}
}
if (tData.lpCc != NULL)
{
strTmp = tData.lpCc;
if (!strTmp.IsEmpty())
{
strTmp.Replace(_T("\""),_T("\\""));
strFormat.Format(_T(" -cc \"%s\""),strTmp);
strContent += strFormat;
}
}
if (tData.lpBcc != NULL)
{
strTmp = tData.lpBcc;
if (!strTmp.IsEmpty())
{
strTmp.Replace(_T("\""),_T("\\""));
strFormat.Format(_T(" -bcc \"%s\""),strTmp);
strContent += strFormat;
}
}
if (tData.lpSubject != NULL)
{
strTmp = tData.lpSubject;
if (!strTmp.IsEmpty())
{
strTmp.Replace(_T("\""),_T("\\""));
strFormat.Format(_T(" -subject \"%s\""),strTmp);
strContent += strFormat;
}
}
if (tData.lpBody != NULL)
{
strTmp = tData.lpBody;
if (!strTmp.IsEmpty())
{
strTmp.Replace(_T("\""),_T("\\""));
strFormat.Format(_T(" -body \"%s\""),strTmp);
strContent += strFormat;
}
}
if (tData.lpAttach != NULL)
{
strTmp = tData.lpAttach;
if (!strTmp.IsEmpty())
{
strTmp.Replace(_T("\""),_T("\\""));
strFormat.Format(_T(" -attach \"%s\""),strTmp);
strContent += strFormat;
}
}
更多精彩
赞助商链接