GO
/****** 对象: StoredProcedure [dbo].[SendMail] 脚本日期: 07/31/2008 19:52:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[SendMail]
-- Add the parameters for the stored procedure here
@TO nchar(50),
@CC nchar(50),
@StrBody ntext
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
@profile_name ='SendMailBy163.com',
@recipients=@TO,
@subject = @StrSubject,
@body = @StrBody,
@body_format = 'HTML' ;
END
/* 发送邮件 */
FrmSendMail_SendMail= function() {
// return jsx3.ide.debug();
var objService = BBS2.loadResource("FrmSendMail_xml_");
objService.setOperation("SendMail");
// objService.setEndpointURL(proxy.convertURI(objService.getEndpointURL()));
objService.subscribe(jsx3.net.Service.ON_SUCCESS, FrmSendMail_SendMail_onUserSuccess);
objService.subscribe(jsx3.net.Service.ON_ERROR, FrmSendMail_SendMail_onUserError);
objService.subscribe(jsx3.net.Service.ON_INVALID, FrmSendMail_SendMail_onUserInvalid);
objService.doCall();
}
//-------------------------------------------
FrmSendMail_SendMail_onUserSuccess = function(objEvent) {
// return jsx3.ide.debug();
// 新贴完成, 关闭
}
//--------------------------------------------
FrmSendMail_SendMail_onUserError = function(objEvent) {
//* * * * * * * * * * * * * 错?~ * * * * * * * * * * * * * * * *
// return jsx3.ide.debug();
var myStatus = objEvent.target.getRequest().getStatus();
var responseXML = objEvent.target.getInboundDocument();
BBS2.alert("发生错误", "呼叫服务器失败! HTTP状态代码是: " + myStatus + "", function(){
this.getAncestorOfType(jsx3.gui.Dialog).doClose();
}
, "确定");
}
//----------------------------------------------
FrmSendMail_SendMail_onUserInvalid = function(objEvent) {
var myStatus = objEvent.target.getRequest().getStatus();
var responseXML = objEvent.target.getInboundDocument();
BBS2.alert("发生错误", "非法呼叫服务器失败! HTTP状态代码是: " + myStatus + "", function(){
this.getAncestorOfType(jsx3.gui.Dialog).doClose();
}
, "确定");
}