%
' Email related functions
Function EZMail()
EZMail = "EasyMail.SMTP.6"
End Function
Function EZMailSMTPKey()
EZMailSMTPKey = "Steuber Web Services (Single Developer)/00506307107913001E20"
End Function
Function EZMailPOP3Key()
EZMailPOP3Key = "Steuber Web Services (Single Developer)/00506307107913001E20"
End Function
Function EZMailSMTP()
EZMailSMTP = "192.168.1.87"
End Function
Function EZMailExpress()
EZMailExpress = "C:\program files\easymail smtp express"
End Function
Function SWS_td(num)
if num < 10 then
td = "0" & num
else
td = num
end if
End Function
Function SWS_DateString(curtime)
DayNames = "SunMonTueWedThuFriSat"
DayName = mid(DayNames, 3 * Weekday(curtime) - 2, 3)
ds = DayName & ", " & Day(curtime) & " " & MonthName(Month(curtime), true) _
& " " & Year(curtime) & " " & SWS_td(Hour(curtime)) & ":" & SWS_td(Minute(curtime)) _
& ":" & SWS_td(Second(curtime)) & " "
tz = SWS_timezone()
if tz > 0 then
ds = ds & "-"
else
tz = - tz
end if
tz = tz / 60
ds = ds & SWS_td(tz) & "00"
SWS_DateString = ds
End Function
Sub SWS_Msg(field, name)
sp = 1
if maxwidth + 3 > len(name) then sp = maxwidth + 3 - len(name)
message = message & name & ":" & space(sp) & session(field) & vbcrlf
End Sub
Sub SWS_SendMsg(subject, message)
Dim smtp
set smtp = CreateObject(EZMail())
smtp.Domain = session("domain")
smtp.mailserver = EZMailSMTP()
smtp.LicenseKey=EZMailSMTPKey()
smtp.from = session("MailFromName")
smtp.fromAddr = session("MailFrom")
smtp.addrecipient session("MailToName"), session("MailTo"), 1
if session("MailTo") <> "info@steuber.com" then
smtp.addrecipient "Patton Steuber", "pat@steuber.com", 3
end if
smtp.subject = subject
smtp.BodyText = message
' smtp.AddCustomHeader "Date", SWS_DateString(now)
ret = smtp.send()
if ret<>0 Then
Error = "Your message was not sent. System returned error code " & ret
nErrors = nErrors + 1
end if
End Sub
Sub SWS_Missing(field, name)
if session(field) = "" then
Error = Error & " " & name & " is missing" & " " & vbcrlf
nErrors = nErrors + 1
end if
End Sub
Function SWS_Plural()
p = ""
if nErrors > 1 then
p = "s"
end if
SWS_Plural = p
End Function
'Option Button
SelectFieldName = ""
Sub SWS_Sel(field)
SelectFieldName=field
if field = "" then
S = "" & vbcrlf
else
S = "