I am using this code to send email using classic ASP:

Set oJMail = Server.CreateObject("JMail.SMTPMail")
with oJMail
    .Sender = "myemail"
    .SenderName = "Me"
    .AddRecipient "some email"
    .Subject = "some subject"
    .Body = "Name: " & fname & " Email:" & email & "Phone: " & phone
end with

oJMail.ServerAddress = "mysmtp:25"
oJMail.Execute
Set oJMail = Nothing

But the server keep throwing this error:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/index.asp, line 108

Set oJMail = Server.CreateObject("JMail.SMTPMail")
----^

Can it be something to do with my page header?

<%@ Language="javascript" %>

没有正确的解决方案

其他提示

Yes, that looks like VBScript code, in which case you'd want your page header to have:

<%@ Language="VBScript" %> 

Of course, this causes problems if the rest of your page is already written in JavaScript.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top