I've copied some pages from our old server to a new one, this page is no longer sending emails and instead is throwing an error. I expect I haven't set something right with the server/service since it worked before and the code hasn't changed. Here's the sub that's dieing:
sub send_email(x_subject, x_body, x_to, x_from)
'used for sending mail to a single recipient
sch = "http://schemas.microsoft.com/cdo/configuration/
set cdoConfig = CreateObject("CDO.Configur
.Item(sch & "sendusing") = 2
.Item(sch & "smtpserver") = "127.0.0.1"
set cdoMessage = CreateObject("CDO.Message"
set .Configuration = cdoConfig
.From = x_from
.To = x_to
.Subject = x_subject
.HtmlBody = x_body
set cdoMessage = nothing
set cdoConfig = nothing
If I comment out the call to the sub there's no error, but it also doesn't send the email, obviously.