Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

E-Mail Attachments

[FIXED] - Scroll down for information on how it was fixed

Is it possible to have osTicket pull in the attachments when it creates a ticket from an email?

edit: Looking at class.mailfetch.php I see the getAttachments() method so I'm thinking it might just not be working. I've also noticed that it's unable to move messages to the Archive folder I created in the mailbox. I wonder if the problems are related? This is Exchange 2003 using IMAP.


  • Also, for whatever reason if I run the cron php script as root from a command line, it spits out some PHP warnings about sessions (shouldnt cause any problem) but doesn't retrieve e-mails. If I let it run from cron it can pull in the emails and open tickets, but it won't move to Archive (it just deletes them) and won't pull in attachments.
  • Regarding your move to archive folder via IMAP question:

    The option:

    Move to [blank] folder

    Should not actually be there, it does not work because it has not actually been implemented yet. I believe that it is planned on being implemented in 1.8.
  • I'm attempting to move it to a named folder (Named "Archive").
  • Yes I got that from your post. I'm telling you that feature does work, has never worked, and shouldn't even be in the admin panel settings at this time.
  • ntozier;44287 said:
    Yes I got that from your post. I'm telling you that feature does work, has never worked, and shouldn't even be in the admin panel settings at this time.
    It does work! The catch is you have to know how your mail server structures folders. Some do INBOX.Archive, /Archive or just Archive.
  • Really? Doh. When did it get fixed?
  • Any advice on how to troubleshoot this? Not bringing in attachments or moving to folder (just deleting)?
  • For anyone searching, I was able to get it to move the files into a subfolder by using the folder name: "INBOX/Archive" (without quotes). Hopefully that will help anyone searching.

    It successfully creates the ticket and moves the email to the archive folder, but it's still not adding the attachments to the ticket.
  • Settings:

    It's pulling in attachments now. With 2 new issues:

    1) [FIXED] It won't pull in wav files sent via email from our voicemail system (Cisco Unity)

    *** UPDATE
    The issue appears to be that because it's sent as a file, $struct->parts wasn't passing because it wasn't an attachment a separate file. Commenting out line 432 in class.mailfetch.php fixed it.

    429 if($message
    430 && $ost->getConfig()->allowEmailAttachments()
    431 && ($struct = imap_fetchstructure($this->mbox, $mid))
    432 // && $struct->parts <----- THIS IS THE OFFENDING CONDITION!
    433 && ($attachments=$this->getAttachments($struct))) {

    I'd seriously consider looking at modifying that line and verifying if an individual item is the attachment.

    2) [FIXED] The files appear to be corrupt, usually. The file size is accurate, but wav files won't play and jpg images can't be viewed. The download in Chrome using "Save As" hangs at X/X bytes complete (entire file complete) like it's waiting for an EOF or something.

    This only affects Chrome. Works fine in IE.

    Chrome Version: Version 29.0.1547.66 m
    IE Version: 10.0.9200.16635

    *** UPDATE
    This miraculously started working, not sure what happened.
Sign In or Register to comment.