I am using PHPMailer and have a problem with an attachment.
My goal -
- save the original email as eml - my coding for this works great.
- then send a new email -. with new message text in the body - AND then attach the original email, as an attachment. The original email was saved as a .eml file.
Basically attaching the original email as an attachment to a new email.
I tried different mime type and can not seem to get it right.
I need to make sure that it will display correctly when the user clicks on it, regardless of where the user has hosted their email account.
The problem is - it will not always display correctly in different email hosting sites.
For example, in gmail, when you click on the attachment, it displays correcttly.
BUT in hostgator , it displays as base64 - at least I think that is the format. is - pretty sure)
When I checked the saved email for mime type, it displays ‘‘message/rfc822’’.
So I tried using that, it doesn’t like it at all - it spits at me…sigh.
Below is my latest efforts:
$mail->AddAttachment(‘./workeml/’, ‘OriginalEmail.eml’,‘base64’,‘message/rfc822’);
Can someone be as so kind to help me resolve this issue ?
Thank you.