您的位置:首页 > 大数据 > 人工智能

LR录制使用foxmail发送邮件到163邮箱原始脚本

2014-07-31 09:27 387 查看
Action部分

[plain] view
plaincopyprint?





Action()  

{  

  

    <span style="color:#FF6666;">smtp1 = 0;</span>  

    smtp_logon_ex(&smtp1, "SmtpLogon",   

        "URL=smtp://smtp.xxx.com",   

        "LogonUser=xxx@xxx.com",   

        "LogonPass=xxxxxx",   

        "CommonName=LoadRunner User",   

        LAST);  

  

    smtp_send_mail_ex(&smtp1, "SendMail",   

        "To=wwwwww@163.com",   

        "From=<xxx@xxx.com> SIZE=1544903",   

        "Subject==?gb2312?B?0ru34rLiytTTyrz+IGZvcjE2M9PKz+Q=?=",   

        "ContentType=multipart/mixed;",   

        MAILOPTIONS,   

            "From: xxx <xxx@xxx.com>",   

            "To: wwwwww<wwwwww@163.com>",   

            "Reply-To: xxx<xxx@xxx.com>",   

            "X-Priority: 3",   

            "X-Has-Attach: yes",   

            "X-Mailer: Foxmail 7.0.1.92[cn]",   

        MAILDATA,   

            "AttachRawFile=mailnote1_01.dat",   

            "AttachRawFile=mailnote1_02.dat",   

        LAST);  

  

    //lr_think_time(16);  

  

    smtp_logout_ex(&smtp1);  

  

    smtp_free_ex(&smtp1);  

  

    return 0;  

}  

globals_h部分

[plain] view
plaincopyprint?





#ifndef _GLOBALS_H   

#define _GLOBALS_H  

  

//--------------------------------------------------------------------  

// Include Files  

#include "lrun.h"  

#include "mic_smtp.h"  

  

//--------------------------------------------------------------------  

// Global Variables  

<span style="color:#FF6666;">SMTP smtp1;</span>  

  

#endif // _GLOBALS_H  

mailnote1_01.dat为主题部分。内容略

mailnote1_02.dat为附件部分。内容略
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: