So, basically I have an HTML file that opens perfectly on its own, however I've tried sending emails with the HTML and the emails just simply never send. It says they've sent, but they do not enter the inbox. I've checked spam. However, when I do shorter HTML code (or no html code at all for that matter), it sends perfectly. is this an error with my html code? or is this an error with the code being too long (it's pretty long)?
Not sure to ask this in html or php because the emailer file is in php
here's the emailer
<?php
header ( 'Cache-Control: no-store, no-cache, must-revalidate' );
header ( 'Cache-Control: post-check=0, pre-check=0' , false );
header ( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
header ( 'Last-Modified: ' . gmdate ( 'D, d M Y H:i:s' ). 'GMT' );
header ( 'Pragma: no-cache' );
header ( 'Content-Type: text/plain' );
$to = '' ;
$from = '' ;
$subject = '' ;
$headers = "From: " . $from . "\r\n" ;
$headers .= "Reply-To: " . $from . "\r\n" ;
$headers .= "MIME-Version: 1.0\r\n" ;
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n" ;
$headers .= "X-Mailer: Microsoft Office Outlook, Build 12.0.4210\r\n" ;
$headers .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165\r\n" ;
$headers .= "X-Originating-IP:\r\n" ;
$message = <<<EOF
<html>VERY LONG HTML CODE HERE</html>
EOF;
echo "[?] Sending..\n" ;
if ( mail ( $to , $subject , $message , $headers )) {
echo '[+] Email was sent sucessfully.' ;} else {echo '[!] Failed to send.' ;}
die();
?>