I have this predefined phrase for testing and my problem is that PHP mail function won't send it. Maybe the encoding is wrong but I already changed it to follow utf-8
Phrase:
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro labore architecto fuga tempore omnis aliquid, rerum numquam deleniti ipsam earum velit aliquam deserunt, molestiae officiis mollitia accusantium suscipit fugiat esse magnam eaque cumque, iste corrupti magni? Illo dicta saepe, maiores fugit aliquid consequuntur aut, rem ex iusto dolorem molestias obcaecati eveniet vel voluptatibus recusandae illum, voluptatem! Odit est possimus nesciunt.
This from KEditor:
https://rawgit.com/Kademi/keditor/master/examples/blank.html
It's in the components part of the demo.
My PHP Code:
$content = $_POST['content'];
$email = $_POST['email_add'];
if(!empty($content)){
$message = '
<html>
<head>
<title>Awesome Email</title>
</head>
<body>
'.$content.'
</body>
</html>
';
// To send HTML mail, the Content-type header must be set
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=utf-8';
// Send
if(mail($email, 'My Subject', $message, implode("\r\n", $headers))){
echo "Email Sent";
}else{
echo "Email not sent";
}
}else{
echo "Failed";
}
My other problem is how to format HTML Emails with bootstrap grid?
Example this one (the actual email content):
<section><div class="m_-5028752718443096113row">
<div class="m_-5028752718443096113col-sm-6">
<section><p>The quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the river</p>
</section></div>
<div class="m_-5028752718443096113col-sm-6">
<section><p>The quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the riverThe quick brown fox jumps over the lazy dog near the bank of the river</p>
</section></div>
</div></section>
The col class has been changed and a prefix has been added. (This is my first time sending emails with bootstrap classes on it)
If I include the bootstrap cdn class in the email would it still be able to recognize it's classes even though they were changed?