唯一纯白的梦里花,盛开在琥珀色月牙,就算是去所有爱的力量,我也不曾害怕!-------本站点部分文章来自网络,如果涉及到版权问题请与本人联系,本人将及时删除
4、TD邮件发送脚本编写示例
上一篇 /
下一篇 2007-04-18 13:37:47
/ 个人分类:TD
c'y4}~:Y4q
U ga0当用户改变TD优先级时,如何通过程序发送email,编写脚本如下:
3Ju0U7Q^lw/SdW+E0Sub Defects_Bug_FieldChange(FieldName)
yIzq,D\'NX0On Error Resume Next
4\b@q%YB,t0
)At)wN$O,G:Y7F4f*S^0If FieldName="BG_PRIORITY" then ' Check if the field changed is priority
*vv"d*O|${
Q)i4X q0 If Bug_Fields("BG_PRIORITY").Value="5-Urgent" Then 'check if priority is changed to urgent.51Testing软件测试网4pOAi6_}E5t
P,j(H
dim tdc ' TDConnection 51Testing软件测试网9g"J&Tc,V
dim header 'as string
]'R9V9zw7G0 dim body 'as string
Q['y@*e1U({&q Me0 51Testing软件测试网#r
m)K:Gt2Y
set tdc = TDConnection 'initilalize td connection object 51Testing软件测试网
{1A
Y7dU9f
header="Defect ID:" & Bug_Fields("BG_BUG_ID").Value & " - Changed to priority : " & Bug_Fields("BG_PRIORITY").Value
*`!N_h+c,j*\5Jw0 body="Defect Summary : " & Bug_Fields("BG_SUMMARY").Value 51Testing软件测试网]]8u&L"O'Ku3_z*a
51Testing软件测试网uZfSIjM.UK 'send email 51Testing软件测试网u#LE
Ut9Ujg
'parameters of TDConnection.SendMail are the following:
N&y'E cx+w0 'SendMail(<To>, <From>, <Subject (Optional)>, <Message (Optional)>, <AttachArray (Optional)>, 51Testing软件测试网(@0[5Sv'H}
'<Format(HTML or Text, Optional)>)
B6VVk+ltJ0 tdc.SendMail Fields("BG_RESPONSIBLE").Value&"@merc-int.com","admin","Summary","body",NULL,"HTML"
A.BVP"]0
51Testing软件测试网}kkE3h!z end if
S)b8?nf0end if 51Testing软件测试网+MrB2F"d#R`
Z V
S!A@1O1B0On Error GoTo 0 51Testing软件测试网K;b.M;ZbR
End Sub51Testing软件测试网t5DqE&{p/BE0\
收藏
举报
TAG:
TD