|
LR版本R9.0
脚本协议:SMTP
客户端:Ms OutLook Express
录制脚本如下:
Action()
{
smtp1 = 0;
smtp_logon_ex(&smtp1, "SmtpLogon",
"URL=smtp://zhouqiong@shobc.com",
"LogonUser=zhouqiong",
"LogonPass=******",
"CommonName=LoadRunner User",
LAST);
smtp_send_mail_ex(&smtp1, "SendMail",
"To=ham1983@sina.com",
"From=zhouqiong@shobc.com", //录制的时候,没有这句.比较了别人的脚本,我加上去的.但是,加不加一个样.
"Subject=sdafsdf",
"ContentType=text/plain;",
"",
MAILOPTIONS,
"X-Priority: 3",
"X-MSMail-Priority: Normal",
"X-Mailer: Microsoft Outlook Express 6.00.3790.3959",
"X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325",
MAILDATA,
"MessageText=asdfsadffff\r\nsample 2",
LAST);
smtp_logout_ex(&smtp1);
smtp_free_ex(&smtp1);
return 0;
}
回放的Reply Log:
Virtual User Script started
Starting action vuser_init.
Ending action vuser_init.
Running Vuser...
Starting iteration 1.
Starting action Action.
Action.c(5): Debug message:Smtp Logon to zhouqiong@shobc.com
Action.c(5): Debug message:Smtp Logon successful.
Action.c(12): Debug message:Smtp send mail To: ham1983@sina.com
Action.c(27): Debug message:Smtp Session closed.
Action.c(29): Debug message:Smtp session freed.
Ending action Action.
Ending iteration 1.
Ending Vuser...
Starting action vuser_end.
Ending action vuser_end.
Vuser Terminated.
录制的时候是在收件箱是收到邮件的.
但是回放时邮箱没有收到.
请大家帮帮忙
[ 本帖最后由 ham301 于 2008-10-28 15:35 编辑 ] |
|