{"id":19221092,"url":"https://github.com/ledermann/tinnef","last_synced_at":"2025-05-13T01:14:35.657Z","repository":{"id":912358,"uuid":"672781","full_name":"ledermann/tinnef","owner":"ledermann","description":"Ruby wrapper for \"tnef\"","archived":false,"fork":false,"pushed_at":"2020-04-11T17:37:39.000Z","size":62,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T01:14:18.516Z","etag":null,"topics":["e-mail","mail","microsoft","ruby","rubygems","tnef"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ledermann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-18T10:35:15.000Z","updated_at":"2024-10-17T07:06:31.000Z","dependencies_parsed_at":"2022-08-16T11:25:22.165Z","dependency_job_id":null,"html_url":"https://github.com/ledermann/tinnef","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledermann%2Ftinnef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledermann%2Ftinnef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledermann%2Ftinnef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ledermann%2Ftinnef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ledermann","download_url":"https://codeload.github.com/ledermann/tinnef/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253851073,"owners_count":21973674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["e-mail","mail","microsoft","ruby","rubygems","tnef"],"created_at":"2024-11-09T14:39:52.255Z","updated_at":"2025-05-13T01:14:35.633Z","avatar_url":"https://github.com/ledermann.png","language":"Ruby","readme":"# tinnef\n\n[![Build Status](https://travis-ci.org/ledermann/tinnef.svg?branch=master)](https://travis-ci.org/ledermann/tinnef)\n[![Code Climate](https://codeclimate.com/github/ledermann/tinnef/badges/gpa.svg)](https://codeclimate.com/github/ledermann/tinnef)\n\nThis gem handles e-mail attachments packaged in the Microsoft \"application/ms-tnef\" MIME type. It's a Ruby wrapper for the [tnef converter](http://tnef.sourceforge.net).\n\nFrom [Wikipedia](http://en.wikipedia.org/wiki/Transport_Neutral_Encapsulation_Format): \"Transport Neutral Encapsulation Format or TNEF is, despite the name, a proprietary E-mail attachment format used by Microsoft Outlook and Microsoft Exchange Server. An attached file with TNEF encoding is most often named winmail.dat or win.dat, and has a MIME type of Application/MS-TNEF.\"\n\n\n## Requirements\n\n### Ruby\n\nTested with Ruby \u003e= 1.9.3\n\n### tnef\n\nThe binary of tnef is required in a current version, 1.4.6 is ok. Check if this tool already exists on your machine:\n\n    tnef --version\n\nIt doesn't exist? You can install it:\n\n#### Mac OS X\n\nUsing Homebrew, just do:\n\n    brew install tnef\n\nUsing MacPorts, just do:\n\n    sudo ports install tnef\n\n#### Linux\n\nThere are chances that this will work:\n\n    apt-get install tnef\n\nBeware: On older Linux distribution, you will get a too old version of tnef, which does not work (e.g. 1.4.3 in Ubuntu Hardy), so you have to compile it by yourself. It's easy:\n\n    wget http://sourceforge.net/projects/tnef/files/tnef/v1.4.7/tnef-1.4.7.tar.gz/download\n    tar -xzvf tnef-1.4.7.tar.gz\n    cd tnef-1.4.7\n    ./configure\n    make\n    make check\n    make install\n\n#### Windows\n\nWhat? I don't think this gem will work on Windows.\n\n\n## Installation\n\n    gem install tinnef\n\n## Usage\n\nThe gem defines the class TNEF with a class method to convert a given winmail.dat file. Use it with a block like in the following example:\n\n```ruby\nrequire 'rubygems'\nrequire 'tinnef'\n\ncontent = File.new('winmail.dat').read\nTNEF.convert(content, :command =\u003e '/opt/local/bin/tnef') do |temp_file|\n  unpacked_content = temp_file.read\n  unpacked_filename = File.basename(temp_file.path)\n\n  File.open(\"/some/path/#{unpacked_filename}\", 'w') do |new_file|\n    new_file.write(unpacked_content)\n  end\nend\n```\n\n## About the naming of this gem\n\n\"Tinnef\" is a german slang word for \"rubbish\" or \"trash\". TNEF =\u003e TiNnEF =\u003e Tinnef - you know?\n\n## Note on Patches/Pull Requests\n\n* Fork the project.\n* Make your feature addition or bug fix.\n* Add tests for it. This is important so I don't break it in a\n  future version unintentionally.\n* Commit, do not mess with rakefile, version, or history.\n  (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)\n* Send me a pull request. Bonus points for topic branches.\n\n## Copyright\n\nThis code is based on the work by Peter Collingbourne, published as part of the [alaveteli](https://github.com/sebbacon/alaveteli/blob/master/lib/tnef.rb) project.\nThank you for sharing!\n\nCopyright (c) 2010-2013 Georg Ledermann. See MIT-LICENSE for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledermann%2Ftinnef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fledermann%2Ftinnef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fledermann%2Ftinnef/lists"}