letter_opener icon indicating copy to clipboard operation
letter_opener copied to clipboard

Exposing Letter Opener File Save Path

Open jonmchan opened this issue 8 months ago • 0 comments

I was interested in knowing where the generated message was being located so that I can open it up in another application. This PR simply exposes the generated message path in the original Mail::Message object. Thought someone else might find this useful.

It exposes the rich and the plain version at:

mail['location-rich'].value
=> "/app/tmp/letter_opener/1700503091_0311892_1d5f48e/rich.html"
mail['location-plain'].value
=> "/app/tmp/letter_opener/1700503091_0311892_1d5f48e/plain.html"

This object is returned from mailers such as ActiveMailer after the mail is sent.

jonmchan avatar Nov 20 '23 18:11 jonmchan