?? sendeventemail.asp
字號:
<%
'向某人發送事件郵件
'errstr:如果自動發送郵件出現錯誤時輸出錯誤提示
function send_event_email(emailtitle,senduserid,getuserid,emailcontent,errstr)
dim errorstr
errorstr=""
if emailtitle="" then
errorstr=errorstr&"電子郵件標題為空!<br>"
end if
if senduserid="" then
errorstr=errorstr&"發送用戶ID號為空!<br>"
end if
if getuserid="" then
errorstr=errorstr&"接收用戶ID號為空!<br>"
end if
on error resume next
set conn1=opendb("oabusy","conn1","accessdsn")
conn1.begintrans
sql="insert into getemailtable (senduserid,getuserid,emailtitle,emailcontent)"
sql=sql&" values("&senduserid&","&getuserid&",'"&emailtitle&"','"&emailcontent&"')"
conn1.execute(sql)
if err.number<>0 then
conn1.rollbacktrans
conn1.close
set conn1=nothing
errorstr=errorstr&errstr
else
conn1.committrans
conn1.close
set conn1=nothing
end if
send_event_email=errorstr
end function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -