I have a page which is sending an HTML email with the following PHP code:
$message = $body;//Create message body
$sender = $sender;//Create sender
$to = $customer_email;//Set who the email is being sent to
$subject = 'Quote - '.$_SESSION['quote_number'];//Subject for email
$headers = 'Content-type: text/html; charset=iso-8859-1' . "\r\n";//Content-type header for mail() PHP built-in function
$headers .= 'To: '.$to . "\r\n";//To header for mail()
$headers .= 'From: '.$sender . "\r\n";//From header for mail()
$mail = mail($to, $subject, $message, $headers);//Send Email
Here is the part of the body with the image:
<img src="some_img.gif" alt="Title" width="400" height="55" align="left"/>
Right now when the email is sent, the image is not automatically downloaded, you have to right click it and download it. Is there a solution to automatically download this image within the mail() PHP function? If not, what is the easiest way I could do it?
I have done some research on this already, I have already looked at over 4 articles, here are a few that did not make sense to me, so I have not used the code in them. They are also pretty outdated.
Embed images for use in email message using PHP?
I am not interested in really complex code, for me I cannot stand classes and things like that where I just plain don't understand them.