The application creates a list of emails in order to send an outage notification.
I am trying to allow the user to look at a list of emails before the email is sent to see if the emails are in the correct format so they can correct them in the database.
Code:
@{
Layout = "~/_Layout.cshtml";
var db = Database.Open("MySQLConnection");
var csList = Request["affectedList"];
var getList = db.Query("SELECT 'email1@gmail.com' as email union select 'email2@gmail.com' as email");
var emailList = "SELECT email FROM dbo.vwOutagesEmail WHERE servicenumber IN ({0})";
getList = db.QueryIn(emailList, csList);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script>
function goBack()
{
window.history.back()
}
</script>
<title></title>
</head>
<body>
@if(IsPost){
<h3>List of affected customers:</h3>
foreach(var item in getList){
@Functions.IsValidEmail(email)
@item.email
}
}
<button onclick="goBack()">Go Back</button>
</body>
</html>
I'm using my emails to test for right now.
Thanks
Laura