[PR #60] [CLOSED] NEW Feature: try to open email attachments that have no file extension #137

Closed
opened 2026-03-03 01:20:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/d99kris/nmail/pull/60
Author: @sc0ttj
Created: 11/20/2020
Status: Closed

Base: masterHead: feature--open-attachments-without-extensions


📝 Commits (2)

  • 0b74862 Added: try to open email attachments that have no file extension:
  • 0a5d393 fixed a typo in a DEBUG message in src/ui.cpp

📊 Changes

1 file changed (+111 additions, -94 deletions)

View changed files

📝 src/ui.cpp (+111 -94)

📄 Description

Instead of popping up an error saying unknown extension, try to
open the file with the external viewer. Let the external
viewer decide if the file can be opened or not.

This has not been super heavily tested, although I was able to
open various plain text attachments without issues, which had
no extension, like "mailcap", "config" and so on.

(I used w3m as my external viewer in tests, following the fix in
a previous commit to make it work OK.)

The actual change is one block at: https://github.com/d99kris/nmail/pull/60/files#diff-55aec75c24c55b4c3afef28178fec266f9fce113d40a1f876df30a711d3f499eR2616

I didn't think hard about the consequences of this change, so I
wont feel bad if you don't want them lol.

Also bear in mind: I don't know C++, no idea if I should unset some
vars or what else.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/d99kris/nmail/pull/60 **Author:** [@sc0ttj](https://github.com/sc0ttj) **Created:** 11/20/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature--open-attachments-without-extensions` --- ### 📝 Commits (2) - [`0b74862`](https://github.com/d99kris/nmail/commit/0b74862ded3a1c4af8d1ce5c826f0a7324a367d8) Added: try to open email attachments that have no file extension: - [`0a5d393`](https://github.com/d99kris/nmail/commit/0a5d393d531f817190e5c9c768a9e6bbe7739e49) fixed a typo in a DEBUG message in src/ui.cpp ### 📊 Changes **1 file changed** (+111 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `src/ui.cpp` (+111 -94) </details> ### 📄 Description Instead of popping up an error saying unknown extension, try to open the file with the external viewer. Let the external viewer decide if the file can be opened or not. This has not been super heavily tested, although I was able to open various plain text attachments without issues, which had no extension, like "mailcap", "config" and so on. (I used w3m as my external viewer in tests, following the fix in a previous commit to make it work OK.) The actual change is one block at: https://github.com/d99kris/nmail/pull/60/files#diff-55aec75c24c55b4c3afef28178fec266f9fce113d40a1f876df30a711d3f499eR2616 I didn't think hard about the consequences of this change, so I wont feel bad if you don't want them lol. Also bear in mind: I don't know C++, no idea if I should unset some vars or what else. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:20:06 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nmail#137
No description provided.