mikel / mail

A Really Ruby Mail Library
MIT License
3.6k stars 931 forks source link

Various questions regarding built-in capabilities #1574

Open forthrin opened 1 year ago

forthrin commented 1 year ago

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 commented 1 year ago

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

sebbASF commented 1 year ago

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

forthrin commented 1 year ago

@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.
sebbASF commented 1 year ago
  1. don’t know, offhand.
  2. https://rubygems.org/ has a search facility