From 487765701187fc414d4479cbb27a182896934064 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 9 Jul 2018 22:34:15 +0000 Subject: [PATCH] --- Pages/Contact.cshtml | 8 +- Pages/Contact.cshtml.cs | 4 +- Pages/request.cshtml | 6 +- Pages/request.cshtml.cs | 4 +- Pages/requestlite.cshtml | 157 ++++++++++++++++++++++++++++++++++++ Pages/requestlite.cshtml.cs | 104 ++++++++++++++++++++++++ 6 files changed, 272 insertions(+), 11 deletions(-) create mode 100644 Pages/requestlite.cshtml create mode 100644 Pages/requestlite.cshtml.cs diff --git a/Pages/Contact.cshtml b/Pages/Contact.cshtml index 92ab628..121f731 100644 --- a/Pages/Contact.cshtml +++ b/Pages/Contact.cshtml @@ -52,7 +52,7 @@
- +
@@ -63,7 +63,7 @@
- +
@@ -74,7 +74,7 @@
- +
@@ -85,7 +85,7 @@
- +
diff --git a/Pages/Contact.cshtml.cs b/Pages/Contact.cshtml.cs index 90290a9..53a4665 100644 --- a/Pages/Contact.cshtml.cs +++ b/Pages/Contact.cshtml.cs @@ -42,7 +42,7 @@ namespace contact.Pages //TODO: go to a successful submit page on the ayanova site //return Redirect("/confirm.html");//sample quickie page I made up - return Redirect("https://ayanova.com"); + return Redirect("https://ayanova.com/confirmed.htm"); } @@ -73,7 +73,7 @@ namespace contact.Pages using (var message = new MailMessage()) { message.To.Add(new MailAddress(Contact.Email)); - message.From = new MailAddress("noreply@ayanova.com"); + message.From = new MailAddress("support@ayanova.com"); message.Subject = $"Confirmation that your question about AyaNova has been received from {Contact.Company}"; message.Body = MessageBody; diff --git a/Pages/request.cshtml b/Pages/request.cshtml index 320ddb1..c787001 100644 --- a/Pages/request.cshtml +++ b/Pages/request.cshtml @@ -28,7 +28,7 @@
- +
@@ -39,7 +39,7 @@
- +
@@ -50,7 +50,7 @@
- +
diff --git a/Pages/request.cshtml.cs b/Pages/request.cshtml.cs index 16c46f7..e0d568c 100644 --- a/Pages/request.cshtml.cs +++ b/Pages/request.cshtml.cs @@ -44,7 +44,7 @@ namespace contact.Pages //TODO: go to a successful submit page on the ayanova site //return Redirect("/confirm.html");//sample quickie page I made up - return Redirect("https://ayanova.com"); + return Redirect("https://ayanova.com/confirmed.htm"); } @@ -78,7 +78,7 @@ namespace contact.Pages using (var message = new MailMessage()) { message.To.Add(new MailAddress(Contact.Email)); - message.From = new MailAddress("noreply@ayanova.com"); + message.From = new MailAddress("support@ayanova.com"); message.Subject = $"Confirmation of Request for 30 day temporary AyaNova activation keycode from {Contact.Company}"; message.Body = MessageBody; diff --git a/Pages/requestlite.cshtml b/Pages/requestlite.cshtml new file mode 100644 index 0000000..8f49591 --- /dev/null +++ b/Pages/requestlite.cshtml @@ -0,0 +1,157 @@ +@page +@model RequestLiteModel +@{ + ViewData["Title"] = "Request AyaNova Lite 30 day Activation Key"; +} + + +
+ +
+ +

Try AyaNova Lite for free

+

Receive a 30 day Activation Key via email to fully unlock your AyaNova Lite!

+

Check out Lite features

+
+
+
+ + +

 

+ + + +
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+ + +
+ +
+ +
+
+ +
+
+
+
+
+

The email address you provided will automatically and immediately receive a copy of what you sent to us. If you do not receive, see below for possible resolutions.

+

All of our responses are from real live people, so there could be a delay receiving the key and steps to proceed due to time zone differences, time of day, weekend, or if a holiday long weekend.

+

As soon as we can, we will reply to the email address you provided with 2 email messages - an email from us with links for setup and recommended tutorials, and a second email that contains your specific instructions to fetch and apply your Activation Key to your already downloaded and installed latest version of AyaNova.

+

Do download the AyaNova setup file and install to your desktop, and start checking out AyaNova's service management features by following along with the tutorials!

+

Why do we ask for your name, company name and email address?

+

We use the information you send us to email you your company's temporary Activation Key, to provide sales support and technicial support to you and your company, and to make AyaNova recommendations and suggestions to you and your company. Also refer to our Privacy Policy for more clarity.

+ +
+
+
+
+ +
+
+
+
+
+

If you have sent a request, but have not received a confirmation email

+

 

+

1. Check the spelling of your email address:

+

Just in case!

+

 

+

2. Confirm that your email address mailbox is not full:

+

Your mailbox may have an email quota. And if email forwarding, do check both the email address originally sent to as well as the email address account being forwarded to.

+

 

+

3. Check your Junk folder:

+

If you find the email(s) from us in your Junk folder, do edit your spam settings so that all email from support@ayanova.com is allowed.

+

 

+

4. Issues with HotMail or AOL accounts:

+

If you have sent an email using a HotMail or AOL account (@@hotmail.com or @@aol.com), although we may receive it and have sent a reply, you may never receive our emails and we will never be advised that it was rejected by HotMail

+

You can also check out these two URL links about why not to use a HotMail account if you actually want to receive email from other's that do not have a HotMail account:

+

http://www.theregister.com/2007/05/01/hotmail_friendly_fire/

+

http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat

+

 

+

5. Your SPAM settings:

+

Your email program or your ISP (Internet Service Provider) is using a spam filter that is filtering out all email from us, or certain email depending on the content.

+

You may need to edit your email program and/or contact your ISP to allow all email from support@ayanova.com

+

Once you have done this, either forward your previous email, or send a new email stating that you did not receive a reply due possibly to a spam filter, and we will resend the information.

+

We are not made aware by your spam filter that the email has not been received by you. The only way is if you confirm the receipt, or contact us again.

+
+
+
+
+
+ + + + +
+
+
+ Ground Zero Tech-Works Inc., 05 - 3610 Christie Parkway Courtenay, BC V9N 9T6 Canada +
+ Since 1999 AyaNova® is a registered trademark of Ground Zero Tech-Works Inc. in the United States and other countries. +
+ End User License Agreement | Privacy Policy
+
+
+ \ No newline at end of file diff --git a/Pages/requestlite.cshtml.cs b/Pages/requestlite.cshtml.cs new file mode 100644 index 0000000..7cd779f --- /dev/null +++ b/Pages/requestlite.cshtml.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc.RazorPages; +using System.ComponentModel.DataAnnotations; +using Microsoft.AspNetCore.Mvc; +using System.Net.Mail; +using System.Net; + +namespace contact.Pages +{ + + public class RequestLiteFormModel + { + [Required] + public string Name { get; set; } + [Required] + public string Company { get; set; } + [Required] + public string Referrer { get; set; } + [Required, EmailAddress] + public string Email { get; set; } + [Required] + public string Message { get; set; } + } + + public class RequestLiteModel : PageModel + { + public string Message { get; set; } + [BindProperty] + public RequestFormModel Contact { get; set; } + + + public ActionResult OnPost() + { + if (!ModelState.IsValid) + { + return Page(); + } + //fuck those Russian spammers + if(Contact.Company.ToLowerInvariant()!="google") + SendMail(); + + //TODO: go to a successful submit page on the ayanova site + //return Redirect("/confirm.html");//sample quickie page I made up + return Redirect("https://ayanova.com/confirmed.htm"); + } + + + private void SendMail() + { + //aspx version: + //m.Body = "Name:\r\n" + edName.Value + "\r\nCompany:\r\n" + edCompany.Value + "\r\nReferrer:\r\n" + edReferrer.Value + "\r\nAdditional:\r\n" + edOther.Value + "\r\nRequested from:\r\n"; + + var MessageBody = $"Name:\r\n{Contact.Name}\r\nCompany:\r\n{Contact.Company}\r\nReferrer:\r\n{Contact.Referrer}\r\nAdditional:\r\n{Contact.Message}"; + + //SEND TO US + using (var message = new MailMessage()) + { + message.To.Add(new MailAddress("support@ayanova.com")); + message.From = new MailAddress(Contact.Email); + message.Subject = $"Request for 30 day temporary **AyaNova Lite** activation keycode {Contact.Company}"; + message.Body = MessageBody; + using (var smtpClient = new SmtpClient("mail.ayanova.com")) + { + + smtpClient.Host = "mail.ayanova.com"; + smtpClient.Port = 2525; + smtpClient.UseDefaultCredentials = false; + //NOTE: Do not use the noreply email address to send mail, it crashes the server somehow + smtpClient.Credentials = new System.Net.NetworkCredential("webmaster@ayanova.com", "c63c17add818fca81cae71a241ea1b552675a86280b7e7e45d36cbf2e8f3bc0e"); + smtpClient.Send(message); + } + } + + //SEND COPY TO CLIENT + using (var message = new MailMessage()) + { + message.To.Add(new MailAddress(Contact.Email)); + message.From = new MailAddress("support@ayanova.com"); + message.Subject = $"Confirmation of Request for 30 day temporary **AyaNova Lite** activation keycode for {Contact.Company}"; + message.Body = MessageBody; + + using (var smtpClient = new SmtpClient("mail.ayanova.com")) + { + + smtpClient.Host = "mail.ayanova.com"; + smtpClient.Port = 2525; + smtpClient.UseDefaultCredentials = false; + //NOTE: Do not use the noreply email address to send mail, it crashes the server somehow + smtpClient.Credentials = new System.Net.NetworkCredential("webmaster@ayanova.com", "c63c17add818fca81cae71a241ea1b552675a86280b7e7e45d36cbf2e8f3bc0e"); + smtpClient.Send(message); + } + } + + } + + public void OnGet() + { + Message = "Your contact page."; + } + } +}