added html tags and Download Report button

This commit is contained in:
Filip 2019-08-05 12:43:25 +02:00
parent bb9f4be46e
commit 666458bb5c

View File

@ -4,6 +4,14 @@
//ini_set('memory_limit', -1); //ini_set('memory_limit', -1);
error_reporting(0); error_reporting(0);
echo '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Inspect Mail | Report for ' . $_POST['domain'] . '</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>';
if ( ! $_POST['domain'] ) { if ( ! $_POST['domain'] ) {
echo '<span style="color: red;">Mail Server field is empty.</span>'; echo '<span style="color: red;">Mail Server field is empty.</span>';
die; die;
@ -13,6 +21,8 @@ echo '<br><form action="inspect-mail.php" method="post">
<input type="text" name="domain" value="' . $_POST['domain'] . '"> <input type="text" name="domain" value="' . $_POST['domain'] . '">
<input type="submit" value="ReTest"> <input type="submit" value="ReTest">
</form> </form>
<br>
<a style="appearance: button; -moz-appearance:button; -webkit-appearance:button; padding: 5px 15px; color: #000; text-decoration: none;" onclick="this.href=\'data:text/html;charset=UTF-8,\'+encodeURIComponent(document.documentElement.outerHTML)" href="#" download="MailInspect-Report-' . $_POST['domain'] . '.html">Download</a>
<p><em>Note: To get NS and MX records for the domain, make sure you test a FQDN that has a valid A record. domain.tld should work.<br> <p><em>Note: To get NS and MX records for the domain, make sure you test a FQDN that has a valid A record. domain.tld should work.<br>
To get SPF record, test SMTP server\'s FQDN with a valid A record or it\'s IP address.</em><br></p>'; To get SPF record, test SMTP server\'s FQDN with a valid A record or it\'s IP address.</em><br></p>';
@ -165,3 +175,6 @@ foreach ( $sslports as $sslport ) {
echo '<span style="color: red;">There is no certificate on the port.</span>'; echo '<span style="color: red;">There is no certificate on the port.</span>';
} }
} }
echo '</body>
</html>';