This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"preLaunchTask": "build",
|
"preLaunchTask": "build",
|
||||||
// If you have changed target frameworks, make sure to update the program path.
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/contact.dll",
|
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/contact.dll",
|
||||||
"args": [],
|
"args": [],
|
||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
|
|||||||
@@ -68,6 +68,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="Contact.DbId" class="col-md-3 right">DbId:</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<input asp-for="Contact.DbId" placeholder="AyaNova 8 Database Id (optional)" class="form-control" required />
|
||||||
|
<span asp-validation-for="Contact.DbId"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -162,8 +173,8 @@
|
|||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<h3>Can I phone someone or have someone phone me?</h3>
|
<h3>Can I phone someone or have someone phone me?</h3>
|
||||||
<p>To continue to provide support to service companies around the world that are trialling AyaNova as well as affordable subscription support to those that have purchased AyaNova licenses, we do not provide phone support.</p>
|
<p>In order to be able to provide an affordable product for small business with fast technical support globally, we do not provide phone support.</p>
|
||||||
<p>Please contact us via the online form above, or send us a direct email to <strong>support@ayanova.com</strong> and our North American support staff will respond quite quickly between 9:00AM and 5:00PM Pacific Standard Time (-8GMT/ UTC).</p>
|
<p>Please contact us via the online form above, or send us a direct email to support@ayanova.com and our North American support staff will respond promptly between 9:00AM and 5:00PM Pacific Standard Time (-8GMT/ UTC) Monday to Friday.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,23 +15,30 @@ using Microsoft.Extensions.Configuration;
|
|||||||
|
|
||||||
namespace contact.Pages
|
namespace contact.Pages
|
||||||
{
|
{
|
||||||
|
[BindProperties(SupportsGet = true)]
|
||||||
public class ContactFormModel
|
public class ContactFormModel
|
||||||
{
|
{
|
||||||
|
public ContactFormModel()
|
||||||
|
{
|
||||||
|
DbId = "n/a v7";
|
||||||
|
}
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string Company { get; set; }
|
public string Company { get; set; }
|
||||||
|
[BindProperty(SupportsGet = true)]
|
||||||
|
public string DbId { get; set; }
|
||||||
[Required, EmailAddress]
|
[Required, EmailAddress]
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ContactModel : PageModel
|
public class ContactModel : PageModel
|
||||||
{
|
{
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
[BindProperty]
|
[BindProperty(SupportsGet = true)]
|
||||||
public ContactFormModel Contact { get; set; }
|
public ContactFormModel Contact { get; set; }
|
||||||
|
|
||||||
private readonly IConfiguration _configuration;
|
private readonly IConfiguration _configuration;
|
||||||
@@ -71,7 +78,7 @@ namespace contact.Pages
|
|||||||
|
|
||||||
private void SendMail()
|
private void SendMail()
|
||||||
{
|
{
|
||||||
var MessageBody = $"Name:\r\n{Contact.Name}\r\n\r\nCompany:\r\n{Contact.Company}\r\n\r\nMessage:\r\n{Contact.Message}";
|
var MessageBody = $"Name:\r\n{Contact.Name}\r\n\r\nCompany:\r\n{Contact.Company}\r\n\r\nDatabase Id:\r\n{Contact.DbId}\r\n\r\nMessage:\r\n{Contact.Message}";
|
||||||
|
|
||||||
//SEND TO US
|
//SEND TO US
|
||||||
using (var message = new MailMessage())
|
using (var message = new MailMessage())
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace contact.Pages
|
|||||||
|
|
||||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
// [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
public void OnGet()
|
public void OnGet()
|
||||||
{
|
{
|
||||||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
|
||||||
|
|||||||
@@ -1,158 +0,0 @@
|
|||||||
@page
|
|
||||||
@model RequestModel
|
|
||||||
@{
|
|
||||||
ViewData["Title"] = "Request AyaNova 30 day Activation Key";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<div class="jumbotron text-center" style="background-image: url(images/jumbotronbackgroundABC.png); background-size: 100% no-repeat center;">
|
|
||||||
<font color="white">
|
|
||||||
<h2>Try AyaNova for free</h2>
|
|
||||||
<h4>Receive a 30 day Activation Key via email to fully unlock your AyaNova!</h4>
|
|
||||||
<p><a class="btn btn-primary btn-lg" href="https://ayanova.com/service_management_software.htm" role="button">Check out features</a></p>
|
|
||||||
</font>
|
|
||||||
</div><!--close jumbotron-->
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p> </p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<form class="form form-horizontal" method="post">
|
|
||||||
<div asp-validation-summary="All"></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Name" class="col-md-3 right">Name:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Name" placeholder="Your name" class="form-control" required autofocus />
|
|
||||||
<span asp-validation-for="Contact.Name"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Company" class="col-md-3 right">Company:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Company" placeholder="Your Company Name" class="form-control" required />
|
|
||||||
<span asp-validation-for="Contact.Company"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Email" class="col-md-3 right">Email:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Email" placeholder="email@you.com" class="form-control" required />
|
|
||||||
<span asp-validation-for="Contact.Email"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Referrer" class="col-md-3 right">How did you hear about AyaNova:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Referrer" placeholder="Friend, Google search, Capterra ....." class="form-control" />
|
|
||||||
<span asp-validation-for="Contact.Referrer"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Message" class="col-md-3 right">Message:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<textarea asp-for="Contact.Message" rows="6" class="form-control"></textarea>
|
|
||||||
<span asp-validation-for="Contact.Message"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Button -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-md-4 control-label" for="Send"></label>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="g-recaptcha" data-callback="imNotARobot" data-sitekey="6LcH7GUUAAAAAJIDf_JDZolSv__xN6oqr9Dx79zs"></div>
|
|
||||||
<button id="btnsubmit" type="submit" class="btn btn-info" >Receive 30 day Activation key</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<button type="submit">Send</button>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</form>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
<p>The email address you provided will automatically and immediately receive a copy of what you sent to us. <strong> If you do not receive, see below for possible resolutions.</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p>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 <a href="https://ayanova.com/download.htm" title="Download the AyaNova setup file and other options"><strong>downloaded</strong></a> and installed latest version of AyaNova.</p>
|
|
||||||
<p>Do <strong><a href="https://ayanova.com/download.htm" title="Download the AyaNova setup file and other options">download</a></strong> the AyaNova setup file and install to your desktop, and start checking out AyaNova's service management features by following along with the <a href="https://www.ayanova.com/AyaNova7webHelp/index.html?quickstart_for_beginners.htm" target="_blank" title="Tutorials include step by step with screenshots"><strong>tutorials!</strong></a></p>
|
|
||||||
<strong><p>Why do we ask for your name, company name and email address?</p></strong>
|
|
||||||
<p>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 <a href="https://www.ayanova.com/privacypolicy.htm" target="_blank">Privacy Policy</a> for more clarity.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
<h3>If you have sent a request, but have not received a confirmation email</h3>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>1. Check the spelling of your email address:</strong></p>
|
|
||||||
<p>Just in case!</p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>2. Confirm that your email address mailbox is not full:</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>3. Check your Junk folder:</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>4. Issues with HotMail or AOL accounts:</strong></p>
|
|
||||||
<p>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</p>
|
|
||||||
<p>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:</p>
|
|
||||||
<p><a href="http://www.theregister.com/2007/05/01/hotmail_friendly_fire/" target="_blank">http://www.theregister.com/2007/05/01/hotmail_friendly_fire/</a> </p>
|
|
||||||
<p><a href="http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat" target="_blank">http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat</a> </p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>5. Your SPAM settings:</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p>You may need to edit your email program and/or contact your ISP to allow all email from support@ayanova.com </p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p>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.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--start bottom container-->
|
|
||||||
<div class="container text-center">
|
|
||||||
<div class="row">
|
|
||||||
<hr>
|
|
||||||
<small><span>Ground Zero Tech-Works Inc., 05 - 3610 Christie Parkway Courtenay, BC V9N 9T6 Canada</span>
|
|
||||||
<br>
|
|
||||||
<span>Since 1999 AyaNova® is a registered trademark of Ground Zero Tech-Works Inc. in the United States and other countries.</span>
|
|
||||||
<br>
|
|
||||||
<span><a href="https://ayanova.com/license.htm">End User License Agreement</a></li> | <a href="https://ayanova.com/privacypolicy.htm">Privacy Policy</a></span></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--end bottom container-->
|
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
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;
|
|
||||||
//for captcha:
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
namespace contact.Pages
|
|
||||||
{
|
|
||||||
|
|
||||||
public class RequestFormModel
|
|
||||||
{
|
|
||||||
[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 RequestModel : PageModel
|
|
||||||
{
|
|
||||||
public string Message { get; set; }
|
|
||||||
[BindProperty]
|
|
||||||
public RequestFormModel Contact { get; set; }
|
|
||||||
private readonly IConfiguration _configuration;
|
|
||||||
public RequestModel(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult OnPost()
|
|
||||||
{
|
|
||||||
if (!ModelState.IsValid)
|
|
||||||
{
|
|
||||||
return Page();
|
|
||||||
}
|
|
||||||
if (!ReCaptchaPassed(
|
|
||||||
Request.Form["g-recaptcha-response"], // that's how you get it from the Request object
|
|
||||||
_configuration.GetSection("GoogleReCaptcha:secret").Value
|
|
||||||
))
|
|
||||||
{
|
|
||||||
//Return a fail code that will hopefully take us off the spammers list
|
|
||||||
return StatusCode(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
SendMail();
|
|
||||||
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 activation keycode from {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 activation keycode from {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.";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool ReCaptchaPassed(string gRecaptchaResponse, string secret)
|
|
||||||
{
|
|
||||||
HttpClient httpClient = new HttpClient();
|
|
||||||
var res = httpClient.GetAsync($"https://www.google.com/recaptcha/api/siteverify?secret={secret}&response={gRecaptchaResponse}").Result;
|
|
||||||
if (res.StatusCode != HttpStatusCode.OK)
|
|
||||||
{
|
|
||||||
// logger.LogError("Error while sending request to ReCaptcha");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
string JSONres = res.Content.ReadAsStringAsync().Result;
|
|
||||||
dynamic JSONdata = JObject.Parse(JSONres);
|
|
||||||
if (JSONdata.success != "true")
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
@page
|
|
||||||
@model RequestLiteModel
|
|
||||||
@{
|
|
||||||
ViewData["Title"] = "Request AyaNova Lite 30 day Activation Key";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
<div class="jumbotron text-center" style="background-image: url(images/jumbotronbackgroundABC.png); background-size: 100% no-repeat center;">
|
|
||||||
<font color="white">
|
|
||||||
<h2>Try AyaNova Lite for free</h2>
|
|
||||||
<h4>Receive a 30 day Activation Key via email to fully unlock your AyaNova Lite!</h4>
|
|
||||||
<p><a class="btn btn-primary btn-lg" href="https://ayanova.com/work_order_software.htm" role="button">Check out Lite features</a></p>
|
|
||||||
</font>
|
|
||||||
</div><!--close jumbotron-->
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p> </p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<form class="form form-horizontal" method="post">
|
|
||||||
<div asp-validation-summary="All"></div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Name" class="col-md-3 right">Name:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Name" placeholder="Your name" class="form-control" required autofocus />
|
|
||||||
<span asp-validation-for="Contact.Name"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Company" class="col-md-3 right">Company:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Company" placeholder="Your Company Name" class="form-control" required />
|
|
||||||
<span asp-validation-for="Contact.Company"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Email" class="col-md-3 right">Email:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Email" placeholder="email@you.com" class="form-control" required />
|
|
||||||
<span asp-validation-for="Contact.Email"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Referrer" class="col-md-3 right">How did you hear about AyaNova:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<input asp-for="Contact.Referrer" placeholder="Friend, Google search, Capterra ....." class="form-control" />
|
|
||||||
<span asp-validation-for="Contact.Referrer"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="Contact.Message" class="col-md-3 right">Message:</label>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<textarea asp-for="Contact.Message" rows="6" class="form-control"></textarea>
|
|
||||||
<span asp-validation-for="Contact.Message"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Button -->
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-md-4 control-label" for="Send"></label>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="g-recaptcha" data-callback="imNotARobot" data-sitekey="6LcH7GUUAAAAAJIDf_JDZolSv__xN6oqr9Dx79zs"></div>
|
|
||||||
<button id="btnsubmit" type="submit" class="btn btn-info" >Receive 30 day Lite Activation key</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<button type="submit">Send</button>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</form>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
<p>The email address you provided will automatically and immediately receive a copy of what you sent to us. <strong> If you do not receive, see below for possible resolutions.</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p>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 <a href="https://ayanova.com/download.htm" title="Download the AyaNova setup file and other options"><strong>downloaded</strong></a> and installed latest version of AyaNova.</p>
|
|
||||||
<p>Do <strong><a href="https://ayanova.com/download.htm" title="Download the AyaNova setup file and other options">download</a></strong> the AyaNova setup file and install to your desktop, and start checking out AyaNova's service management features by following along with the <a href="https://www.ayanova.com/AyaNova7webHelp/index.html?quickstart_for_beginners.htm" target="_blank" title="Tutorials include step by step with screenshots"><strong>tutorials!</strong></a></p>
|
|
||||||
<strong><p>Why do we ask for your name, company name and email address?</p></strong>
|
|
||||||
<p>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 <a href="https://www.ayanova.com/privacypolicy.htm" target="_blank">Privacy Policy</a> for more clarity.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-md-12">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
<h3>If you have sent a request, but have not received a confirmation email</h3>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>1. Check the spelling of your email address:</strong></p>
|
|
||||||
<p>Just in case!</p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>2. Confirm that your email address mailbox is not full:</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>3. Check your Junk folder:</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>4. Issues with HotMail or AOL accounts:</strong></p>
|
|
||||||
<p>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</p>
|
|
||||||
<p>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:</p>
|
|
||||||
<p><a href="http://www.theregister.com/2007/05/01/hotmail_friendly_fire/" target="_blank">http://www.theregister.com/2007/05/01/hotmail_friendly_fire/</a> </p>
|
|
||||||
<p><a href="http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat" target="_blank">http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat</a> </p>
|
|
||||||
<p> </p>
|
|
||||||
<p><strong>5. Your SPAM settings:</strong></p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p>You may need to edit your email program and/or contact your ISP to allow all email from support@ayanova.com </p>
|
|
||||||
<p>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.</p>
|
|
||||||
<p>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.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--start bottom container-->
|
|
||||||
<div class="container text-center">
|
|
||||||
<div class="row">
|
|
||||||
<hr>
|
|
||||||
<small><span>Ground Zero Tech-Works Inc., 05 - 3610 Christie Parkway Courtenay, BC V9N 9T6 Canada</span>
|
|
||||||
<br>
|
|
||||||
<span>Since 1999 AyaNova® is a registered trademark of Ground Zero Tech-Works Inc. in the United States and other countries.</span>
|
|
||||||
<br>
|
|
||||||
<span><a href="https://ayanova.com/license.htm">End User License Agreement</a></li> | <a href="https://ayanova.com/privacypolicy.htm">Privacy Policy</a></span></small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!--end bottom container-->
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
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;
|
|
||||||
//for captcha:
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Net.Http.Headers;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
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; }
|
|
||||||
private readonly IConfiguration _configuration;
|
|
||||||
public RequestLiteModel(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
_configuration = configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult OnPost()
|
|
||||||
{
|
|
||||||
if (!ModelState.IsValid)
|
|
||||||
{
|
|
||||||
return Page();
|
|
||||||
}
|
|
||||||
if (!ReCaptchaPassed(
|
|
||||||
Request.Form["g-recaptcha-response"], // that's how you get it from the Request object
|
|
||||||
_configuration.GetSection("GoogleReCaptcha:secret").Value
|
|
||||||
))
|
|
||||||
{
|
|
||||||
//Return a fail code that will hopefully take us off the spammers list
|
|
||||||
return StatusCode(500);
|
|
||||||
}
|
|
||||||
|
|
||||||
SendMail();
|
|
||||||
|
|
||||||
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.";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool ReCaptchaPassed(string gRecaptchaResponse, string secret)
|
|
||||||
{
|
|
||||||
HttpClient httpClient = new HttpClient();
|
|
||||||
var res = httpClient.GetAsync($"https://www.google.com/recaptcha/api/siteverify?secret={secret}&response={gRecaptchaResponse}").Result;
|
|
||||||
if (res.StatusCode != HttpStatusCode.OK)
|
|
||||||
{
|
|
||||||
// logger.LogError("Error while sending request to ReCaptcha");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
string JSONres = res.Content.ReadAsStringAsync().Result;
|
|
||||||
dynamic JSONdata = JObject.Parse(JSONres);
|
|
||||||
if (JSONdata.success != "true")
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
39
Startup.cs
39
Startup.cs
@@ -1,14 +1,10 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.HttpsPolicy;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
|
|
||||||
namespace contact
|
namespace contact
|
||||||
{
|
{
|
||||||
@@ -24,19 +20,21 @@ namespace contact
|
|||||||
// This method gets called by the runtime. Use this method to add services to the container.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.Configure<CookiePolicyOptions>(options =>
|
services.AddControllers().AddNewtonsoftJson();
|
||||||
{
|
services.AddRazorPages();
|
||||||
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
|
// services.Configure<CookiePolicyOptions>(options =>
|
||||||
options.CheckConsentNeeded = context => true;
|
// {
|
||||||
options.MinimumSameSitePolicy = SameSiteMode.None;
|
// // This lambda determines whether user consent for non-essential cookies is needed for a given request.
|
||||||
});
|
// options.CheckConsentNeeded = context => true;
|
||||||
|
// options.MinimumSameSitePolicy = SameSiteMode.None;
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
// services.AddMvc();//.SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
{
|
{
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
@@ -48,11 +46,18 @@ namespace contact
|
|||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
// app.UseHttpsRedirection();
|
// app.UseHttpsRedirection();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
app.UseCookiePolicy();
|
// app.UseCookiePolicy();
|
||||||
|
app.UseRouting();
|
||||||
|
app.UseEndpoints(endpoints =>
|
||||||
|
{
|
||||||
|
endpoints.MapControllers();
|
||||||
|
endpoints.MapRazorPages();
|
||||||
|
|
||||||
|
|
||||||
app.UseMvc();
|
});
|
||||||
|
// app.UseMvc();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<!-- <ItemGroup>
|
||||||
|
<PackageReference Include="AWSSDK.S3" Version="3.3.111.9" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
|
||||||
|
<PackageReference Include="jose-jwt" Version="2.5.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.4" />
|
||||||
|
<PackageReference Include="mailkit" Version="2.7.0" />
|
||||||
|
|
||||||
|
</ItemGroup> -->
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user