Question

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" %>

No correct solution

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top