<% 'make some variables for the email Dim objNewMail Dim message Dim objDict Set objDict = Server.CreateObject("Scripting.Dictionary") 'the message varabel is the body text in the email objDict.Add "Submit", Request.Form("submitted") if Cstr(objDict("Submit")) = "ok!" then objDict.Add "namn", Request.Form("namn") objDict.Add "telefonnummer", Request.Form("telefonnummer") objDict.Add "epost", Request.Form("epost") objDict.Add "fraga", Request.Form("fraga") message= "Meddelande från hemsidan, Namn: " & objDict("namn") & chr(13) &_ chr(13) &_ "Telefonnummer: " & objDict("telefonnummer") & chr(13) &_ chr(13) &_ "E-post: " & objDict("epost") & chr(13) &_ chr(13) &_ "Fråga: " & objDict("fraga") & chr(13) & "" Set objMail = Server.CreateObject( "CDONTS.NewMail" ) objMail.To = "info@christianso.se" objMail.From = "hemsidan@christianso.se" objMail.Subject = "Mail från hemsidan" objMail.Body = message objMail.Host = "mailout.one.com" objMail.Send Set objMail = Nothing %>
Tack för ditt meddelande!
Vi kontaktar er så snart som möjligt
.
Hälsningar från oss Christiansö
<% 'start up of mailform else %>
Har du någon fråga eller vill kontakta oss?
Vänligen fyll i uppgifterna nedan så kontaktar vi er
Namn:
Telefonnummer:
E-postadress:
Meddelande: