我使用此代码使用经典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
但是服务器不断抛出这个错误:
Microsoft JScript compilation error '800a03ec' Expected ';' /index.asp, line 108 Set oJMail = Server.CreateObject("JMail.SMTPMail") ----^
这可以与我的页面标题有关吗?
<%@ Language="javascript" %>
答案 0 :(得分:2)
是的,这看起来像VBScript代码,在这种情况下,您希望页面标题包含:
<%@ Language="VBScript" %>
当然,如果页面的其余部分已经用JavaScript编写,则会导致问题。