charmbracelet / pop

Send emails from your terminal 📬
MIT License
2.26k stars 41 forks source link

Feature Request: Add a "Retry" option after failure due to unstable API connection #45

Open mukirkland opened 7 months ago

mukirkland commented 7 months ago

Hello,

I'm currently using pop as my terminal client for sending emails and I find it extremely useful for my day-to-day tasks. However, I often face an issue due to instability of the underlying Resend.com API, specifically when I'm accessing it from China.

Sometimes, after typing a long email, I notice that the send action fails because the connection to resend.com wasn't successful. Currently, the only option I am presented with is to quit the email client, which forces me to lose all the input I had provided and retype everything when I open the client again for another attempt.

To improve the user experience, I would like to suggest a feature: an automatic or manual "Retry" option in the event of a failed send action. Instead of being forced to quit when there's a failure, the client could provide an option for the user to try and resend the email. This feature would be especially helpful considering the connection issues with the API.

Thank you for your continued dedication to improving Pop. I believe this requested feature would significantly improve user experience, especially for those in regions where the Resend.com API connection might be unstable.

Looking forward to any updates regarding this suggestion.

BR,

maaslalani commented 7 months ago

Hey @mukirkland, thanks for the note. I think this is definitely a solid feature request and I think the way we could go about this is to save the text in the text field to a temporary file when the send fails.

So, that way you can restore the email and try again as well.

pop < /tmp/pop-2023-11-30-938.txt