Varför fungerar inte detta?
<%
Function SendMail(Title,Mess)
Line4: Option Explicit
Dim objNewMail
'---- BodyFormat Property ----
Const CdoBodyFormatHTML = 1 ' The Body property is to include Hypertext Markup Language (HTML).
Const CdoBodyFormatText = 0 ' The Body property is to be exclusively in plain text (default value).
'---- MailFormat Property ----
Const CdoMailFormatMime = 0 ' The NewMail object is to be in MIME format.
Const CdoMailFormatText = 1 ' The NewMail object is to be in uninterrupted plain text (default value).
'---- Importance Property ----
Const CdoLow = 0 ' Low importance
Const CdoNormal = 1 ' Normal importance (default)
Const CdoHigh = 2 ' High importance
'---- AttachFile and AttachURL Methods ----
Const CdoEncodingUUencode = 0 ' The attachment is to be in UUEncode format (default).
Const CdoEncodingBase64 = 1 ' The attachment is to be in base 64 format.
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "webmaster@ricki.nu"
objNewMail.To = "webmaster@ricki.nu"
objNewMail.Subject = Title
objNewMail.Body = Mess
objNewMail.BodyFormat = CdoBodyFormatText
objNewMail.MailFormat = CdoMailFormatText
objNewMail.Importance = CdoNormal
objNewMail.Send
Set objNewMail = Nothing
End Function
%>
<%
'----------------------------------------------------------------
' Skicka ett mail
'----------------------------------------------------------------
Title = "design | Registrering"
Mess = "Välkommen som medlem i design!"
SendMail (Title,Mess)
%>
Jag får följande felmeddelande:
Programsats förväntas.
/design/inc-filer/sendMail.inc, line 4
Option Explicit
------------------
Hälsningar Ricki
www.ricki.nu
[Redigerat av Ricki den 10 dec 2000]