MAIL Question - How to Include a Logo in Message Header

When my website sends an email, I would like the recipient to see my website’s logo when he/she is notified of my email (i.e. on a recipient’s Apple watch).

How do I do this? I have looked on phphelp.com but I cannot find a solution / example. Is there a cost to Apple or to another party for this?

I use:

mail($to, $subject, $message, $headers)

where:
$to = $email1 . $email2 . $email3;
$subject = 'Tennis Match Results: ‘.$one.’ ‘.$two.’, ‘.$three.’ '.$four ;
$headers = ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= ‘From: [email protected]’ . “\r\n” .
‘Bcc:[email protected]’ ."\r\n" .
‘X-Mailer: PHP/’ . phpversion();

I have used this code for about 10 years. I am familiar with the following code so that my icon appears on web browsers.

It has been about a decade since I used phphelp so if I am not wording this question / request correctly, please direct me to a source so that I can do it correctly.

Thank you.

I’m not aware if this is even possible.

  • Branding: Ensure the logo aligns with your overall email design and branding.

I would be cautious using the inbuilt PHP Mail() function for email.
The PHPMailer Library has far more functionality GitHub - PHPMailer/PHPMailer: The classic email sending library for PHP
The inbuilt PHP Mail() function has limited uses, there are other libraries out there that can a lot more.
I am not clear if you wish to put your logo in the body of the email or within your subject line.
You can only place text within the subject line, using RFC 2047 compliant text you can also include emojis.
As far as libraries go the PHPMailer Library has great functionality and appears to be be well supported.
I am by no means an expert but did learn about avoiding the inbuilt mail() function the hard way.

Sponsor our Newsletter | Privacy Policy | Terms of Service