charmbracelet / pop

Send emails from your terminal 📬
MIT License
2.36k stars 49 forks source link

Store email body on failed send #50

Closed allmtz closed 5 months ago

allmtz commented 8 months ago

This is an implementation of #45

When an email fails to send, the body is saved to the /tmp/pop dir with a filename in the format y-m-d-timeStamp. I also updated the error message to display the path of the file created and increased the error display time.

It's now possible to run a command similar to what @maaslalani suggested.

pop < /tmp/pop/2024-1-24-61319

This prevents users having to retype lengthy emails when a send fails and pop must be closed to address the send error.

maaslalani commented 8 months ago

This is awesome @allmtz, thank you so much for this great improvement!

maaslalani commented 5 months ago

Hey @allmtz, thanks so much for this PR. I modified it a little bit in https://github.com/charmbracelet/pop/pull/64 and merged it! Thank you for all the work done on this one!

allmtz commented 5 months ago

@maaslalani sure thing, glad I could help!