Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
inline_images parameter in frappe.sendmail is ignored | GoodFirstPicks

inline_images parameter in frappe.sendmail is ignored

frappe/frappe 2 comments 1mo ago
View on GitHub
lowopenScope: clearSkill match: maybeFrappe / ERPNextPython

Why this is a good first issue

The inline_images parameter is passed but not used in the email sending function.

AI Summary

The issue involves the frappe.sendmail function ignoring the inline_images parameter, instead reading images from disk. The fix requires modifying the set_part_html function to use the passed inline_images parameter rather than reading from disk, which affects multi-tenant applications.

Issue Description

Description of the issue

In frappe/email/email_body.py, the set_part_html function receives inline_images but never uses it:

  def set_part_html(self, message, inline_images):  # inline_images is passed
      has_inline_images = EMBED_PATTERN.search(message)
      if has_inline_images:
          message, _inline_images = replace_filename_with_cid(message)  # reads from disk
          for image in _inline_images:  # uses disk-read images
              self.add_attachment(...)

Context information (for bug reports)

it should pick the inline_images from the param passed and not try to read from disk to support multi-tenant apps and image stored in different sites. Currently it relies only on local disk to read the image. Output of bench version

5.25.9

Steps to reproduce the issue

inline_images = [{ "filename": "files/logo.png", "filecontent": open("/path/to/logo.png", "rb").read(), }]

frappe.sendmail( recipients=["[email protected]"], subject="Test", template="my_template", # contains args={}, inline_images=inline_im

GitHub Labels

bug

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • potential multi-tenant implications
Loading labels...

Details

Points10 pts
Difficultylow
Scopeclear
Skill Matchmaybe
Test Focusedno
Assigneeprathameshkurunkar7