唯一纯白的梦里花,盛开在琥珀色月牙,就算是去所有爱的力量,我也不曾害怕!-------本站点部分文章来自网络,如果涉及到版权问题请与本人联系,本人将及时删除
4、TD邮件发送脚本编写示例
上一篇 /
下一篇 2007-04-18 13:37:47
/ 个人分类:TD
5F~iB{TI~0当用户改变TD优先级时,如何通过程序发送email,编写脚本如下:
;a&W%`of0Sub Defects_Bug_FieldChange(FieldName) 51Testing软件测试网ml$ON@
On Error Resume Next 51Testing软件测试网1f?$n(c O*vr.c
51Testing软件测试网P R~QtIf FieldName="BG_PRIORITY" then ' Check if the field changed is priority 51Testing软件测试网Z7bLu*k
If Bug_Fields("BG_PRIORITY").Value="5-Urgent" Then 'check if priority is changed to urgent.51Testing软件测试网'E]%e
gR5o$LN&q
dim tdc ' TDConnection
/Y1A I3U9F V"])@m5z0 dim header 'as string
9Wpl8]L+E0 dim body 'as string
|Ar+JH)T7_Y\ OP0 51Testing软件测试网N6f4|${1f C9~
set tdc = TDConnection 'initilalize td connection object
b.n&fP#@0 header="Defect ID:" & Bug_Fields("BG_BUG_ID").Value & " - Changed to priority : " & Bug_Fields("BG_PRIORITY").Value 51Testing软件测试网!i/c(T]0@jLF%`
body="Defect Summary : " & Bug_Fields("BG_SUMMARY").Value 51Testing软件测试网
l%dx0{U#]3n
Y\}6aI!E%g)W0 'send email
\,}zi\&zIMy0 'parameters of TDConnection.SendMail are the following:
9Y3Y u:Cbkt ct0 'SendMail(<To>, <From>, <Subject (Optional)>, <Message (Optional)>, <AttachArray (Optional)>, 51Testing软件测试网wHz1J`D4Ve;n
'<Format(HTML or Text, Optional)>)
,z@;WdPvv\0 tdc.SendMail Fields("BG_RESPONSIBLE").Value&"@merc-int.com","admin","Summary","body",NULL,"HTML" 51Testing软件测试网^2bA#?
]2F*M9nK
51Testing软件测试网2~
{,H#P3B8HKe-` end if 51Testing软件测试网2xSM#]lOd0qWc
end if 51Testing软件测试网x2t!c~/j8\,g
nZQ)W2RgQ|S5M@0On Error GoTo 0
5}qXA%x9F
[
r7}xo%x0End Sub51Testing软件测试网3k |9J_\/Wl
收藏
举报
TAG:
TD