唯一纯白的梦里花,盛开在琥珀色月牙,就算是去所有爱的力量,我也不曾害怕!-------本站点部分文章来自网络,如果涉及到版权问题请与本人联系,本人将及时删除

4、TD邮件发送脚本编写示例

上一篇 / 下一篇  2007-04-18 13:37:47 / 个人分类:TD

c'y4}~:Y4q U ga0当用户改变TD优先级时,如何通过程序发送email,编写脚本如下:
3Ju0U7Q^l w/SdW+E0Sub Defects_Bug_FieldChange(FieldName)
yIz q,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)i4Xq0  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 Y7d U9f
    header="Defect ID:" & Bug_Fields("BG_BUG_ID").Value & " - Changed to priority : " & Bug_Fields("BG_PRIORITY").Value
*`!N_h+c,j*\5J w0    body="Defect Summary : " & Bug_Fields("BG_SUMMARY").Value 51Testing软件测试网]]8u&L"O'Ku3_z*a

51Testing软件测试网uZf SIjM.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`

ZV S!A@1O1B0On Error GoTo 0 51Testing软件测试网K;b.M;Z bR
End Sub51Testing软件测试网t5DqE&{p/BE0\


TAG: TD

我的个人空间 引用 删除 selon   /   2007-04-20 11:25:37
不错!
 

评分:0

我来说两句

Open Toolbar