I'm following an article on how to add styles to PHP email. It all works fine but as soon as I add my logo it stops working. But if I add their example, it works...
Their example of an image: <img src="//css-tricks.com/examples/WebsiteChangeRequestForm/images/wcrf-header.png" alt="Website Change Request" />
My image: <img src="//starlightradio.co.uk/images/email-logo.png" alt="Sea Match Rigs - Official Website" />
But for some reason it really doesn't want to work. The email just doesn't send with this image in there.
Here's my whole page of code:
<?php
$to = 'sam.carre2000@gmail.com';
$subject = 'Sea Match Rigs - Password Reset Link';
$headers = "From: noreply@seamatchrigs.co.uk\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$message = '<html>
<div style="width:500px;margin:0 auto;margin-bottom:20px;margin-top:40px;"><img src="//starlightradio.co.uk/images/email-logo.png" alt="Sea Match Rigs - Official Website" /></div>
<head><link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"></head>
<body style="background-color:#2F8982;padding-top:50px;padding-bottom:50px;">
<div style="font-family:Open Sans, sans-serif;">
<div style="height:300px;width:500px;border:1px solid #ccc;border-radius:3px;padding:20px;margin:0 auto;background-color:#fff;">
<div style="color:#349891;font-weight:bold;font-size:25px;text-align:center;">Password Reset Details</div>
<div style="border-bottom:1px solid #349891;margin:0 auto;margin-top:15px;margin-bottom:15px;width:50%;"></div>
<div style="color:#000;font-size:20px;margin-top:10px;text-align:center;">It seems that you have requested to reset your password on <a href="http://seamatchrigs.co.uk" style="color:#000;text-decoration:none;"><b>seamatchrigs.co.uk</b></a>. <div style="color:#FFA500;margin-top:30px;">Please click the button below to reset your password on your account.</div>
<a href=""><div style="height:30px;width:200px;display:inline-block;border:1px solid #349891;color:#349891;padding:20px;border-radius:3px;margin-top:20px;">Click Here</div></a>
</div></body></html>';
mail($to, $subject, $message, $headers);
echo $message;
?>