matcha
matcha copied to clipboard
BUG: strings.Replace instead of ReplaceAll for inline images in sendEmail
Describe the bug
In sendEmail() (main.go:2236), strings.Replace(body, imgPath, "cid:"+cid, 1) only replaces the first occurrence of an image path. If the same image is referenced multiple times in the email body, subsequent occurrences won't be replaced with the correct CID, resulting in broken image references.
To reproduce
- Compose an email with the same image referenced twice in the body
- Send the email
- Second image reference remains as file path instead of CID
Expected behavior
Use strings.ReplaceAll() to replace all occurrences of the image path.
This has had no activity for 30 days. It will be closed in 14 days unless updated. Comment or remove the stale label to keep it open.
Closing due to inactivity. Reopen if still relevant.