<div dir="ltr"><div>Hi James</div><div><br></div><div>That is unfortunately insufficient information - you haven't specified how (example code) you are attempting to achieve this to be able to pinpoint what is going amiss.</div><div><br></div><div>- how the email raw data is being retrieved (lib? custom code?)<br></div><div>- how this is being written to the smtp endpoint (lib? custom code?)</div><div>- what library is being used for your smtp receiver, and if none, what the implementation actually does</div><div>- whether the code might be mangling data (if a content length is specified and copied, but your code replaces LF with CRLF , then data could be falsely truncated)</div><div>- whether the code might be mangling data (if your code is reading utf-8 and writing it rejigged into some sort of win-latin-1 or other, then the data could be mangled)</div><div>- what the raw message and attachment look like coming in, and what it looks like when going back out (byte for byte, using a simple example attachment)<br></div><div>- whether the code might be failing (have you checked logs? what do they indicate?)</div><div>- many other possibilities no doubt, depending on your implementation of the solution overall</div><div><br></div><div>The above may or may no apply in your case (but worth ruling out each in turn) ; if there are further details you can share about the implementation, it may help narrow down the relevant questions to ask.</div><div><br></div><div>HTH</div><div><br></div><div>TK<br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>---</div>@taikedz - he/him<br><div><a href="https://www.meetup.com/Edinburgh-Language-Exchange/" target="_blank">https://www.meetup.com/Edinburgh-Language-Exchange/</a> <br></div><div><br> </div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 22 Oct 2024 at 10:00, James Tobin <<a href="mailto:jamesbtobin@gmail.com">jamesbtobin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am piping alias emails to a php script that looks up a real email<br>
address in MySQL and forwards the email and attachments. However,<br>
I'm having immense difficulty with the attachments. Either they are<br>
sent on but can not be opened or they are not. I've tried multiple<br>
libraries and also php imap. This is on shared hosting<br>
<br>
Any thoughts?<br>
<br>
Thanks,<br>
James<br>
<br>
-- <br>
EdLUG mailing list<br>
<a href="mailto:EdLUG@mailman.lug.org.uk" target="_blank">EdLUG@mailman.lug.org.uk</a><br>
<a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a><br>
</blockquote></div>