.*?<\/$tag>)/is", '', $content ); } unset( $tag ); $content = strip_tags($content); return trim($content); } function SendHTMLAttach ($strHTMLMsg, $FromEmail, $toEmail, $strSubject, $strFileName = "", $strAttach = "", $strAddHeader = "", $strFile2Attach = "") { require_once("PHPMailer/Exception.php"); require_once("PHPMailer/PHPMailer.php"); require_once("PHPMailer/SMTP.php"); $strHTMLMsg = preg_replace("/(\n"; print "
\n"; print "

This is only a test

\n"; print "
"; print "Testing new email function using phpmailer
\nSending email through $MailHost. Use full SSL/TLS: $UseSSL. Use StartTLS: $UseStartTLS
\n"; print "

It is now " . date(DATE_RFC1123) . "

\n"; $strFileName = "Testing.txt"; $strAttach = "Wanted something quick and simple to verify that all the components where in place to make a PHP site driven by mySQL/MariaDB database so I put together this test site. The code grabs some env variables and displayes them as well as displays a table from a database. Run the following query in your database to generate the test table to be shown"; $arrname = array(); $arrname[] = "X-Testing:This is my test header"; $arrname[] = "X-Test2:This is my second header"; $arrname[] = "X-Test3:This is my third header"; $arrname[] = "X-Test4:This is my fourth header"; $strSubject = "Complex HTML test with picture and txt attachment"; $toEmail = "My Tester|tester@example.com"; $FromEmail = "Supergeek Admin|admin@supergeek.us"; $strHTMLMsg = "\n"; $strHTMLMsg .= "\n\n\n\n\n"; $strHTMLMsg .= "\n"; $strHTMLMsg .= "

Welcome!!!!

\n"; $strHTMLMsg .= "This is a supergeek test where we are testing for custom headers
\n"; $strHTMLMsg .= "I hope it works out great
\n"; $strHTMLMsg .= "

Here is a cute picture for you, which can only see if you are HTML capable"; $strHTMLMsg .= " and have remote pictures turned on as it is a remote inline HTML picture

\n"; $strHTMLMsg .= "\n"; $strHTMLMsg .= "\n\n"; $resp = SendHTMLAttach ($strHTMLMsg, $FromEmail, $toEmail, $strSubject, $strFileName, $strAttach, $arrname, '/var/log/alternatives.log'); print "

$resp

\n"; print "

I'm all done at " . date(DATE_RFC1123) . "

\n"; print "\n\n"; ?>