Action部分
- 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部分
- #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为附件部分。内容略