matcha icon indicating copy to clipboard operation
matcha copied to clipboard

BUG: strings.Replace instead of ReplaceAll for inline images in sendEmail

Open andrinoff opened this issue 7 months ago • 2 comments

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

  1. Compose an email with the same image referenced twice in the body
  2. Send the email
  3. Second image reference remains as file path instead of CID

Expected behavior

Use strings.ReplaceAll() to replace all occurrences of the image path.

andrinoff avatar Apr 24 '26 20:04 andrinoff

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.

floatpanebot avatar May 26 '26 06:05 floatpanebot

Closing due to inactivity. Reopen if still relevant.

floatpanebot avatar Jun 09 '26 06:06 floatpanebot