<< Back to previous view

[QB-3997] Send email error
Created: 28/Jun/23  Updated: 06/Jul/23

Status: Closed
Project: QuickBuild
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nguyen Duc Long Assigned To: Robin Shen
Resolution: Won't Fix Votes: 1
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown

File Attachments: Zip Archive backup.zip     JPEG File email.jpg     JPEG File step.jpg    

 Description   
if Korean language is included in attachment file name, attachment file name is broken.

ex)
[Attachment name]
attachment name : ?????.txt
actual received attachment name in gmail : =UTF-8_Q=ED=95=9C=EA=B8=80testfile=ED=95=9C=EA=B8=80_= =UTF-8_Q=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80testfil_= =UTF-8_Q_e=ED=95=9C=EA=B8=80=ED=95=9C=EA=B8=80=E__ __filename_3=D=95=9.txt=

Error exists on QB10 - QB13.
I tried downgrade javax.mail lib to version 1.5.2 and everything has worked normally.
Fix it according to these or other solutions to repair.



 Comments   
Comment by Nguyen Duc Long [ 28/Jun/23 01:55 AM ]
I cannot add Korean characters in the desscription or comment.
If possible, you can also fix it for this page.
Comment by Robin Shen [ 29/Jun/23 12:48 AM ]
Please change default charset to be UTF-8. To do it, edit "<QB server>/conf/wrapper.conf" and add a property:

wrapper.java.additional.10000=-Dfile.encoding=UTF-8

Please note that use 10000 or higher for additional suffix in order not to conflict with future versions of QB.

As to description and comment, please make sure your database encoding is set to UTF8.

Comment by Nguyen Duc Long [ 29/Jun/23 01:23 AM ]
"wrapper.java.additional.10000=-Dfile.encoding=UTF-8"
==> This does not solve the problem, the name of the file is had error.
(View attached image file)

"As to description and comment, please make sure your database encoding is set to UTF8."
==> I am talking about the website https://track.pmease.com/
Comment by Nguyen Duc Long [ 29/Jun/23 01:24 AM ]
step send email
Comment by Nguyen Duc Long [ 29/Jun/23 01:24 AM ]
email
Comment by Robin Shen [ 29/Jun/23 11:25 PM ]
I tested both on Linux and Mac and it works fine. What is the OS of the node running send mail step? I guess the file name to be attached is not using UTF-8 encoding.

As to Korean support on this site, we will try to fix that. Thanks for repoting.
Comment by Nguyen Duc Long [ 30/Jun/23 03:48 AM ]
Our server uses Linux operating system.
We do not encounter this error when using javax.mail lib version 1.5.2.
Let me know if the use of the javax.mail 1.5.2 version makes other function operate the error.
Comment by Robin Shen [ 01/Jul/23 06:26 AM ]
QB upgrades mail api from 1.5 to 1.6 in order to fix the StartTLS issue. I guess your file name encoding is not UTF-8. To check it, you may run below script in QB to print relevant file nams into build log:

groovy:
for (file in configuration.workspaceDir.list()) {
  logger.info(file);
}
Comment by Nguyen Duc Long [ 03/Jul/23 05:23 AM ]
Log returned in normal with UTF8 format.

(I still can't share the log at this comment because it contains Korean characters)
Comment by Nguyen Duc Long [ 03/Jul/23 05:25 AM ]
I don't think the error comes from config or server.
Because the error does not appear before I upgrade my Quickbuild version.
Comment by Robin Shen [ 03/Jul/23 05:36 AM ]
Have you tried some other mail server such as gmail?
Comment by Nguyen Duc Long [ 03/Jul/23 07:05 AM ]
Can you use your server to send an email containing a Korean character in file to [longduc2202 AT gmail DOT com]
Test on QB10 and QB13
Comment by Robin Shen [ 03/Jul/23 10:36 PM ]
Done
Comment by Nguyen Duc Long [ 04/Jul/23 02:51 AM ]
I have been wrong, The name containing Korean characters does not cause errors.
Error appears when Korean characters are placed next to other characters in the file name.
"xxABCxx", "[ABC]", "ABC]xx" ,.... (Replace ABC with Korean characters)
Sorry, please try again.
Comment by Robin Shen [ 04/Jul/23 10:52 PM ]
Still works fine at my side. I am testing my backup here.
Comment by Robin Shen [ 04/Jul/23 10:53 PM ]
Still login with admin/admin after restore. Global storage setting needs to be changed to a path on your server, and mail setting needs to be changed as well.
Comment by Nguyen Duc Long [ 05/Jul/23 04:52 AM ]
Error still appears when I use your DB.
There is a difference in email settings.

SMTP Host: xx.xx.xx.xx
Use SMTP over SSL?: no

Do you think these settings is the reason? I have not changed anything but these things.
Comment by Robin Shen [ 05/Jul/23 11:37 PM ]
For modern mail server, normally you should enable StartTLS option instead of enabling SMTP overs SSL option.
Comment by Nguyen Duc Long [ 06/Jul/23 03:37 AM ]
Please end this issue.
Thanks for your support.
Generated at Thu May 16 23:44:34 UTC 2024 using JIRA 189.