51Testing软件测试论坛

标题: 关于smtp附件的问题 [打印本页]

作者: zhybing    时间: 2008-3-10 11:16
标题: 关于smtp附件的问题
action代码:
smtp1 = 0;
smtp_logon_ex(&smtp1, "SmtpLogon",
        "URL=smtp://test4:ffffff@test-root",
        //"CommonName=LoadRunner User",
        LAST);
smtp_translate("test.txt","Mercury", BASE64_ENCODED, "outfile1.txt");
  smtp_send_mail_ex(&smtp1, "SendMail",
       "From=test4@test.com",
        "To=test1@test.mail",
        "Subject=test1",
        "ContentType=multipart/alternative;",
          MAILOPTIONS,
                     "X-mailer: Foxmail 6, 11, 101, 15 [cn]",
          MAILDATA,
                    "AttachrRawFile=mailnote1_01.dat",
                    "AttachrRawFile=outfile1.txt",
            LAST);   
smtp_logout_ex(&smtp1);
smtp_free_ex(&smtp1);

功能描述:使用smtp_translate把test.txt文件转换成base64编码格式的文件,文件转换后的名称为outfile1.txt,然后在smtp_send_mail_ex把outfile1.txt作为邮件附件发送出去。
结果:所发送的邮件没有携带邮件附件;同时查看outfile1.txt中的内容为test.txt中经过base64编码后的内容;
请教出现上述问题的原因;

[ 本帖最后由 zhybing 于 2008-3-10 11:33 编辑 ]




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2