[GH-ISSUE #1411] 🐛 [Bug] Error when forwarding mail with attachment #650

Closed
opened 2026-02-25 21:35:35 +03:00 by kerem · 8 comments
Owner

Originally created by @indridieinarsson on GitHub (Dec 20, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1411

Originally assigned to: @amaninyumu1 on GitHub.

🐛 Bug

There is an issue when forwarding mails with attachments, in particular mails from a gmail account
This particular issue arises like this:
I have a gmail account. In it, there is a mail which was forwarded to me from somewhere else. It has an attachment (.pptx file).
Now, if I try to forward this mail further, using cypht, I get the following error in the cypht logs after pressing "Send".

Cypht does not send the mail, and reports an error in the GUI.

cypht-1 | NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /usr/local/share/cypht/modules/smtp/modules.php:1860
cypht-1 | Stack trace:
cypht-1 | #0 /usr/local/share/cypht/modules/smtp/modules.php(1860): explode()
cypht-1 | #1 /usr/local/share/cypht/modules/smtp/modules.php(1872): get_uploaded_files_from_array()
cypht-1 | #2 /usr/local/share/cypht/modules/smtp/modules.php(1930): prepare_draft_mime()
cypht-1 | #3 /usr/local/share/cypht/modules/smtp/modules.php(348): save_imap_draft()
cypht-1 | #4 /usr/local/share/cypht/lib/modules_exec.php(178): Hm_Handler_smtp_save_draft->process()
cypht-1 | #5 /usr/local/share/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module()
cypht-1 | #6 /usr/local/share/cypht/lib/dispatch.php(220): Hm_Module_Exec->run_handler_modules()
cypht-1 | #7 /usr/local/share/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request()
cypht-1 | #8 /usr/local/share/cypht/site/index.php(53): Hm_Dispatch->__construct()
cypht-1 | #9 {main}
cypht-1 | thrown in /usr/local/share/cypht/modules/smtp/modules.php on line 1860

Version & Environment

git commit 15ff8558dc
OS: linux - docker image (on linux host)

Originally created by @indridieinarsson on GitHub (Dec 20, 2024). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1411 Originally assigned to: @amaninyumu1 on GitHub. ## 🐛 Bug There is an issue when forwarding mails with attachments, in particular mails from a gmail account This particular issue arises like this: I have a gmail account. In it, there is a mail which was forwarded to me from somewhere else. It has an attachment (.pptx file). Now, if I try to forward this mail further, using cypht, I get the following error in the cypht logs after pressing "Send". Cypht does not send the mail, and reports an error in the GUI. > cypht-1 | NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: explode(): Argument #2 ($string) must be of type string, array given in /usr/local/share/cypht/modules/smtp/modules.php:1860 > cypht-1 | Stack trace: > cypht-1 | #0 /usr/local/share/cypht/modules/smtp/modules.php(1860): explode() > cypht-1 | #1 /usr/local/share/cypht/modules/smtp/modules.php(1872): get_uploaded_files_from_array() > cypht-1 | #2 /usr/local/share/cypht/modules/smtp/modules.php(1930): prepare_draft_mime() > cypht-1 | #3 /usr/local/share/cypht/modules/smtp/modules.php(348): save_imap_draft() > cypht-1 | #4 /usr/local/share/cypht/lib/modules_exec.php(178): Hm_Handler_smtp_save_draft->process() > cypht-1 | #5 /usr/local/share/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module() > cypht-1 | #6 /usr/local/share/cypht/lib/dispatch.php(220): Hm_Module_Exec->run_handler_modules() > cypht-1 | #7 /usr/local/share/cypht/lib/dispatch.php(188): Hm_Dispatch->process_request() > cypht-1 | #8 /usr/local/share/cypht/site/index.php(53): Hm_Dispatch->__construct() > cypht-1 | #9 {main} > cypht-1 | thrown in /usr/local/share/cypht/modules/smtp/modules.php on line 1860 ### Version & Environment git commit 15ff8558dcd4bad608f02c1dab70de64e4a9ef38 OS: linux - docker image (on linux host)
kerem 2026-02-25 21:35:35 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@marclaporte commented on GitHub (Jan 21, 2025):

Related: https://github.com/cypht-org/cypht/pull/1407

<!-- gh-comment-id:2605240934 --> @marclaporte commented on GitHub (Jan 21, 2025): Related: https://github.com/cypht-org/cypht/pull/1407
Author
Owner

@marclaporte commented on GitHub (Jan 21, 2025):

@amaninyumu1 Are you able to reproduce the issue?

<!-- gh-comment-id:2605241824 --> @marclaporte commented on GitHub (Jan 21, 2025): @amaninyumu1 Are you able to reproduce the issue?
Author
Owner

@amaninyumu1 commented on GitHub (Jan 22, 2025):

Yes @marclaporte I work on this.

<!-- gh-comment-id:2606344538 --> @amaninyumu1 commented on GitHub (Jan 22, 2025): Yes @marclaporte I work on this.
Author
Owner

@amaninyumu1 commented on GitHub (Jan 26, 2025):

Hello @marclaporte. After testing on. Based on the description of the bug, all messages that I transfer from one account, then retransfer it to another gmail account using cypht are done with success. on my side there is no bug. thanks

<!-- gh-comment-id:2614505196 --> @amaninyumu1 commented on GitHub (Jan 26, 2025): Hello @marclaporte. After testing on. Based on the description of the bug, all messages that I transfer from one account, then retransfer it to another gmail account using cypht are done with success. on my side there is no bug. thanks
Author
Owner

@marclaporte commented on GitHub (Jan 27, 2025):

@indridieinarsson @amaninyumu1 Please find each other on https://gitter.im/cypht-org/community for a screenshare.

<!-- gh-comment-id:2614805908 --> @marclaporte commented on GitHub (Jan 27, 2025): @indridieinarsson @amaninyumu1 Please find each other on https://gitter.im/cypht-org/community for a screenshare.
Author
Owner

@amaninyumu1 commented on GitHub (Jan 28, 2025):

Hello @marclaporte , @indridieinarsson the url you shared above I'm having trouble accessing it, initially I thought it was my internet connection. here is the screenshot:

Image

<!-- gh-comment-id:2618535478 --> @amaninyumu1 commented on GitHub (Jan 28, 2025): Hello @marclaporte , @indridieinarsson the url you shared above I'm having trouble accessing it, initially I thought it was my internet connection. here is the screenshot: ![Image](https://github.com/user-attachments/assets/c443aace-9e8e-4184-926f-859e54aa8220)
Author
Owner

@marclaporte commented on GitHub (Jan 28, 2025):

@amaninyumu1 Please try via a VPN or a jumpbox.

<!-- gh-comment-id:2618985028 --> @marclaporte commented on GitHub (Jan 28, 2025): @amaninyumu1 Please try via a VPN or a jumpbox.
Author
Owner

@indridieinarsson commented on GitHub (Feb 7, 2025):

Finally got some a bit of time to take a look at this. With the current master branch ( at commit 18965eff2d as of now), I am unable to reproduce it. Tried the same email accounts as sender/receiver and the exact same message that failed before. So I'm closing the issue.

<!-- gh-comment-id:2644303226 --> @indridieinarsson commented on GitHub (Feb 7, 2025): Finally got some a bit of time to take a look at this. With the current master branch ( at commit 18965eff2d0 as of now), I am unable to reproduce it. Tried the same email accounts as sender/receiver and the exact same message that failed before. So I'm closing the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#650
No description provided.