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

Action部分

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. Action()  
  2. {  
  3.   
  4.     <span style="color:#FF6666;">smtp1 = 0;</span>  
  5.     smtp_logon_ex(&smtp1, "SmtpLogon",   
  6.         "URL=smtp://smtp.xxx.com",   
  7.         "LogonUser=xxx@xxx.com",   
  8.         "LogonPass=xxxxxx",   
  9.         "CommonName=LoadRunner User",   
  10.         LAST);  
  11.   
  12.     smtp_send_mail_ex(&smtp1, "SendMail",   
  13.         "To=wwwwww@163.com",   
  14.         "From=<xxx@xxx.com> SIZE=1544903",   
  15.         "Subject==?gb2312?B?0ru34rLiytTTyrz+IGZvcjE2M9PKz+Q=?=",   
  16.         "ContentType=multipart/mixed;",   
  17.         MAILOPTIONS,   
  18.             "From: xxx <xxx@xxx.com>",   
  19.             "To: wwwwww<wwwwww@163.com>",   
  20.             "Reply-To: xxx<xxx@xxx.com>",   
  21.             "X-Priority: 3",   
  22.             "X-Has-Attach: yes",   
  23.             "X-Mailer: Foxmail 7.0.1.92[cn]",   
  24.         MAILDATA,   
  25.             "AttachRawFile=mailnote1_01.dat",   
  26.             "AttachRawFile=mailnote1_02.dat",   
  27.         LAST);  
  28.   
  29.     //lr_think_time(16);  
  30.   
  31.     smtp_logout_ex(&smtp1);  
  32.   
  33.     smtp_free_ex(&smtp1);  
  34.   
  35.     return 0;  
  36. }  

globals_h部分

[plain]  view plain copy print ? 在CODE上查看代码片 派生到我的代码片
  1. #ifndef _GLOBALS_H   
  2. #define _GLOBALS_H  
  3.   
  4. //--------------------------------------------------------------------  
  5. // Include Files  
  6. #include "lrun.h"  
  7. #include "mic_smtp.h"  
  8.   
  9. //--------------------------------------------------------------------  
  10. // Global Variables  
  11. <span style="color:#FF6666;">SMTP smtp1;</span>  
  12.   
  13. #endif // _GLOBALS_H  

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

mailnote1_02.dat为附件部分。内容略

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值