mail icon indicating copy to clipboard operation
mail copied to clipboard

Various questions regarding built-in capabilities

Open forthrin opened this issue 2 years ago • 4 comments

Hi! I'm a new user and trying to get a flying start with the gem. Does it (plan to) support any of the following?

  1. Guess if mime part is an actual "attachment" or decoration garbage for HTML mail
  2. Convert HTML mail to plain text
  3. When doing mail = Mail.read_from_string("From mbox\nSubject: Bar\n"), how does one get the mbox From line?
  4. Parse an mbox file into an array of mail objects
  5. Decode virus killer links in body (urldefense.proofpoint.com, *.safelinks.protection.outlook.com, etc.)
  6. Sanitize file names in attachments (for saving safely to disk)
  7. Handle bounced email (message/delivery-status and message/rfc822)
  8. Quote email (append > to each line)
  9. Add a mail signature from ~/.signature
  10. Utilize the contents of ~/.mailrc files

Thanks in advance! This gem seems to be a real -- well -- gem :)

forthrin avatar Apr 04 '23 12:04 forthrin

@mikel: Little help? Reordered the questions in order of importance. 1-4 are most important.

forthrin avatar Apr 12 '23 05:04 forthrin

My take would be that apart from 3, the rest are not in scope.

As to 3, please see https://github.com/mikel/mail#reading-an-email

sebbASF avatar Apr 12 '23 07:04 sebbASF

@sebbASF

  1. Are you one of the devs, or just a user?
  2. The question is how to get the mbox From line, not the mail header From:. The parser does accept (ie. not throw an exception) if parsing an email starting with this line, but is it available later?
  3. If you know any sleek libraries for the things you deem "out of scope", share links. Only 1 and 2 are really important, as they are a lot of work. The rest is just a few lines of code, but then again not necessary to re-invent the wheel.

forthrin avatar Apr 12 '23 07:04 forthrin

  1. don’t know, offhand.
  2. https://rubygems.org/ has a search facility

sebbASF avatar Apr 12 '23 08:04 sebbASF