In 1.17 and now in 1.18 (just now upgraded) if I add an attachment to a reply, the attachment comes through fine, but the body text is either garbled (Gmail) or blank (Thunderbird).
It appears the issue is that outgoing ticket emails lack a proper text/plain MIME part. osTicket dumps the body as raw text inside multipart/alternative, so strict clients like Thunderbird show a blank message.
ticketOSer
You need to upgrade to v1.18.2 and retest.
Cheers.
Seems the correct and fair reply could have been:
Hey buddy, using a direct download from git is not supported. Use our Download system and it will work.
OK, that makes sense. I indeed used git directly, oops. Sorry about that.
I now downloaded the official 1.18.2 release and dropped it in. No upgrade is possible b/c I was aleady on 1.18 it seems.
Anyhow, now Gmail works but Thunderbird still does not.
You can use a git clone; if you do then use the actual tagged release of v1.18.2. If you go that route then for good measure use the cli deploy command to properly deploy the code to the designated site folder. You can find this information within the repo’s README.
Can you please provide screenshots so we can see what you’re talking about? You should also restart your webserver and PHP-FPM if you’re running it to clear any server-side file cache.
Here is how it looks in OsTicket:
Here in Thunderbird with no attachment, looks fine:
Here with PNG attachment, it comes out inline, but no body text:
Here with PDF attachment, it comes out attached, but no body text:
Thank you.
Seems odd that it works in Gmail but not thunderbird. Can you forward that "broken" email from thunderbird to your Gmail and see if it shows properly there? If so then export the email from thunderbird as EML file and paste the raw contents here so we can run some tests. You may want to censor the email addresses before posting though.
Here is the raw email, with the PDF contents CUT in the middle to make it clearer:
X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 Return-Path: <help@somesite.com> Delivered-To: joe@galleryr.user Received: (qmail 32257 invoked by uid 2901); 25 Aug 2025 12:11:20 -0000 To: =?utf-8?Q?admin?= <shmoe@galleryr.com> Subject: =?UTF-8?Q?[#193508]=20testing?= X-PHP-Script: helpdesk.somesite.com/scp/tickets.php for 181.215.214.46 Date: Mon, 25 Aug 2025 12:11:20 +0000 Message-ID: <BZt=YFP-ICtBo-AAAAAIM1AQAPFgAATSajxJlk-help@somesite.com> X-Mailer: =?UTF-8?Q?osTicket=20Mailer?= From: =?utf-8?Q?somesite?= <help@somesite.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_bca73c50d2423e8ef3596411b5065668" This is a message in Mime Format. If you see this, your mail reader does not support this format. --=_bca73c50d2423e8ef3596411b5065668 Content-Type: multipart/alternative; boundary="=_ff832092cb6a4ce961f5240ebeec267f" // Reply above this line to comment on this issue Dear admin, test -- http://somesite.com/ -- Ref-Mid: BZt=YFP-ICtBo-AAAAAIM1AQAPFgAATSajxJlk-help@somesite.com --=_bca73c50d2423e8ef3596411b5065668 Content-Type: application/pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="osTick.pdf" JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoIE1vZHVsZSAxIDguMTYuMjUuZG9j eCkKL1Byb2R1Y2VyIChTa2lhL1BERiBtMTQxIEdvb2dsZSBEb2NzIFJlbmRlcmVyKT4+CmVu <CUT> MyAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgMzYwCi9Sb290IDMzNSAwIFIKL0luZm8gMSAw IFI+PgpzdGFydHhyZWYKMTQyMzgwCiUlRU9GCg== --=_bca73c50d2423e8ef3596411b5065668--
Issue is that the email body is incorrectly placed inside the MIME structure
To me that sounds like you still have the older code in your site folder or something. What I would recommend is moving the site folder contents out of the main site folder to a backup folder, copy over a fresh download of v1.18.2 (and any plugins) to the site folder, copy over your include/ost-config.php file from the original copy to the include/ folder within the new code, restart the webserver, restart the database server, restart PHP-FPM, and retest.
include/ost-config.php
include/
Let me ask you another question. Do you have SMTP configured for the system email you are using to reply to the Ticket with? If so, can you check if it's still connecting properly by going to the email in the helpdesk, checking the status and information within the Outgoing (SMTP) tab, and clicking Save Changes to see if it connects or errors out? You can also check your system logs to see if there are any Mailer Errors.
I can confirm that my plain-text looks like that however works just fine. Albeit I don't have Thunderbird so maybe they are less-forgiving than Gmail/Outlook? Anyways, I do see a difference in the way Gmail for example formats the MIME part vs the system in regards to plain-text. We will have to take a deeper look at this. Legacy is in maintenance mode whilst we focus on v2.0 so it will be a while before we can even get to this. If you want to take a stab at it then by all means update this thread with your findings. Otherwise, you'd have to wait until we can circle back to this (no timeline at all).
If you are only going to be using PlainText then you can try the following:
include/class.mail.php
class ContentMimeMessage
// This is a wrapper class for Mime/Message that generates multipart // alternative content when email is multipart class ContentMimeMessage extends MimeMessage { public function getContent() { // unpack content parts to a content mime part return $this->generateMessage(); #nolint } public function getContentMimePart($type=null) { $part = new MimePart(base64_decode($this->getContent())); #nolint $part->type = Mime::TYPE_TEXT; $part->encoding = Mime::ENCODING_BASE64; return $part; } }
Restart the webserver and restart PHP-FPM. Then retest and see.
Again, this is only if you are only using plaintext as this will interfere with rich text (HTML) emails.
Thank you for the code. It failed, but I edited it slightly and it works:
class ContentMimeMessage extends MimeMessage { public function getContent() { // unpack content parts to a content mime part return $this->generateMessage(); #nolint } public function getContentMimePart($type = null) { $part = new MimePart($this->getContent()); // no base64_decode $part->type = Mime::TYPE_TEXT; $part->encoding = Mime::ENCODING_QUOTEDPRINTABLE; // or 8BIT if plain ASCII return $part; } }
Thank you!