Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- var customerName = Request["customerName"];
- var customerEmail = Request["customerEmail"];
- var customerPhone = Request["customerPhone"];
- var customerAdress = Request["customerAdress"];
- var customerEtage = Request["customerEtage"];
- var customerElevator = Request["customerElevator"];
- var customerPost = Request["customerPost"];
- var customerCity = Request["customerCity"];
- var customerType = Request["customerType"];
- var customerSize = Request["customerSize"];
- var customerDate = Request["customerDate"];
- var customerInfo = Request["customerInfo"];
- var errorMessage = "";
- var debuggingFlag = false;
- try
- {
- // Initialize WebMail helper
- WebMail.SmtpServer = "smtp.gmail.com";
- WebMail.SmtpPort = 587;
- WebMail.UserName = "herdorfflyt@gmail.com";
- WebMail.Password = "rubinherdorf";
- WebMail.From = "herdorfflyt@gmail.com";
- WebMail.EnableSsl = true;
- // Send email
- WebMail.Send(to: "rasmus@nemnyk.dk",
- subject: "Flytning bestilt fra formular - " + customerName,
- body:
- "<h2>" + "Navn: " + customerName + "</h2>" + "<br />" +
- "<b>" + " - " + "Email: " + "</b>"+ customerEmail + "<br />" +
- "<b>" + " - " + "Telefon: " + "</b>" + customerPhone + "<br />" +
- "<b>" + " - " + "Adresse: " + "</b>" + customerAdress + "<br />" +
- "<b>" + " - " + "Etage: " + "</b>" + customerEtage + "<br />" +
- "<b>" + " - " + "Elevator: " + "</b>" + customerElevator + "<br />" +
- "<b>" + " - " + "PostNummer: " + "</b>" + customerPost + "<br />" +
- "<b>" + " - " + "By: " + "</b >" + customerCity + "<br />" +
- "<b>" + " - " + "Adresse: " + "</b>" + customerAdress + "<br />" +
- "<b>" + " - " + "Boligstørrelse: " + "</b>" + customerSize + "<br />" +
- "<b>" + " - " + "Flytningsdato: " + "</b>" + customerDate + "<br />" +
- "<b>" + " - " + "Andet information: " + "</b>" + customerInfo + "<br />"
- );
- }
- catch (Exception ex)
- {
- errorMessage = ex.Message;
- }
- <p class="p">Tak for din bestilling <b>@customerName</b>.</p>
- if (errorMessage == "")
- {
- <p class="p">
- Vi tjekker dagligt vores emails, og ringer dig op så snart vi har set din bestilling.
- </p>
- <p><b>@customerInfo</b></p>
- }
- else {
- <p class="p"><b>Deres bestilling gik <em>ikke</em> igennem.</b></p>
- if (debuggingFlag)
- {
- <p>Der er styr på det shit</p>
- <p class="p">Hilsen Herdorf flytteforretning</p>
- }
- }
- }
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement