After searching Stack Overflow and the net for this answer, I am requesting assistance. I currently have a form that allows allows a user to upload a file. It is my desire that once this file is uploaded, to then use it as an embedded image in an HTML email by phpmailer. I can upload the file, but when I pass the info to the next page, the code is not picking up the file.
The form uses this label for the attachment (put spaces so code shows up):
<p>
<label><span>Attachment</span>
<input type="file" name="file_attach[]"/>
</label>
</p>
When the form is submitted, the action calls email4.php (which then sends the mail to a local postfix server. In this code, I reference the file as a variable:
$mypromo = $_FILES['file_attach'];
Then I use that variable as the embedded image:
$mail->AddEmbeddedImage($mypromo, "my-attach", "tourney");
Once I send the email, the email comes thru, but no image. Previously, the image shows up if I reference a file on the file system with a path/filename. Is there a way I can use an uploaded file as an embedded image in phpmailer?