'****************** HER SKAL DU SKRIVE DINE OPLYSNINGER START *******************
Email = JMAIL
REM 1 = JMail
REM 2 = CDONTS
REM 3 = ASPMail
fra_email = "arz@mail.kni.gl"
url = "
http://www.piteraq.gl/postmand/view_card.asp"mailheader = "postkort"
billedmappe = "images/kort"
'****************** HER SKAL DU SKRIVE DINE OPLYSNINGER SLUT ********************
if Request.Form("mode") = "sendkort" then
If Request.Form("from_name") = "" OR Request.Form("from_email") = "" OR Request.Form("to_name") = "" OR Request.Form("to_email") = "" OR Request.Form("besked") = "" OR Request.Form("billednavn") = "" then
fejl = 1
end if
if fejl <> 1 then
from_name = replace (request.Form("from_name"),"'","`")
to_name = replace (request.Form("to_name"),"'","`")
besked = replace (request.Form("besked"),"'","`")
SQL = "INSERT INTO kort ( from_mail, from_name, to_mail, to_name, billednavn, besked ) values ('"& Request.Form("from_email") &"', '"& from_name &"', '"& Request.Form("to_email") &"', '"& to_name &"', '"& Request.Form("billednavn") &"', '"& besked &"')"
conn.execute (SQL)
SQL = "SELECT * FROM kort where (from_mail='"& Request.Form("from_email") &"' AND from_name='"& from_name &"' AND to_mail='"& Request.Form("to_email") &"' AND to_name='"& to_name &"' AND billednavn='"& Request.Form("billednavn") &"' AND besked='"& besked &"')"
SET check = Conn.Execute( SQL )
mail_besked = "Der er sendt et postkort til dig fra "& check("from_name") & vbCrLf & vbCrLf &"Gå til "& url &"?id="& check("id") &" for at læse det."
if email = 1 then
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "piteraq.gl"
JMail.Charset = "iso-8859-1"
JMail.ContentTransferEncoding = "8bit"
JMail.Sender = fra_email
JMail.Subject = mailheader
JMail.AddRecipient check("to_mail")
JMail.Body = mail_besked
JMail.Priority = 3
JMail.Execute
elseif email = 2 then
importance = 1
Set mailObj = CreateObject("CDONTS.NewMail")
mailObj.Send fra_email, check("to_mail"), mailheader, mail_besked, importance
Set mailObj = Nothing
elseif email = 3 then
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = fra_email
Mailer.FromAddress= fra_email
Mailer.RemoteHost = "piteraq.gl"
Mailer.AddRecipient check("to_name"), check("to_mail")
Mailer.Subject = mailheader
Mailer.BodyText = mail_besked
end if
kort_sendt = "ok"
else
kort_sendt = "fejl"
end if
end if
%>