在vbs中调用xp_sendmail时出错

时间:2016-07-26 04:11:21

标签: sql-server stored-procedures vbscript

您好我的下面的vbs脚本通过执行xp_sendmail发送电子邮件。

override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
    image.frame.size = CGSizeMake(imageViewSize.width, imageViewSize.height)
    image.center = CGPointMake(webView.bounds.size.height / 2, webView.bounds.size.width / 2)
    webView.frame = CGRectMake(0, 0, self.view.bounds.size.height, self.view.bounds.size.width)
    webView.scrollView.contentSize = webView.frame.size
}
}

这会在行上出错:

superView
  

错误:元素的预期结束。任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

尝试改变这一点:

OS

对此:

Dim email = "me@me.com"
Dim subj = "test"
Dim msg = "message"

cmd.Parameters("@Recipients") = email
cmd.Parameters("@Subject") = subj
cmd.Parameters("@message") = msg 

换句话说,你需要追加参数而不是执行命令。关于cmd.parameters.Append cmd.CreateParameter("Recipients", adVarChar, adParamInput, 50, "me@me.com") cmd.parameters.Append cmd.CreateParameter("Subject", adVarChar, adParamInput, 50, "test") cmd.parameters.Append cmd.CreateParameter("Message", adVarChar, adParamInput, 50, "message") 的信息hereCreateParameter here