https://github.com/robhurring/tmail-metas
Can strip meta tags from e-mail messages parsed with TMail -- as a TMail plugin
https://github.com/robhurring/tmail-metas
Last synced: 10 months ago
JSON representation
Can strip meta tags from e-mail messages parsed with TMail -- as a TMail plugin
- Host: GitHub
- URL: https://github.com/robhurring/tmail-metas
- Owner: robhurring
- Created: 2009-02-17T02:27:53.000Z (over 17 years ago)
- Default Branch: master
- Last Pushed: 2009-02-17T03:28:59.000Z (over 17 years ago)
- Last Synced: 2025-09-03T01:55:42.335Z (11 months ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
Awesome Lists containing this project
README
=TMail Meta Data Functionality
Allows you to include extra data within the body of e-mail messages for use in automated parsing through TMail.
=Settings
If you need to override the default scanner you can run this:
TMail::Metas.scanner = /Metas\((.*)\)/
TMail::Metas.scanner_options = {:seperator => ':', :group_seperator => ','}
# which will look for this:
# Metas(project_id:12,type:message)
=Example
%w{pp rubygems tmail tmail_metas}.each { |lib| require lib }
EMAIL = <<-end
To: you@example.com
From: me@example.com
Subject: This is my automated email
This is an email which will be automatically handled by a ruby script!
The body will be stripped of these meta tags while they are made available
in the mail.metas hash.
{{project_id=12345&category=Incoming Emails&create=message}}
end
mail = TMail::Mail.parse(EMAIL)
pp mail.metas # => {"category"=>"Incoming Emails", "project_id"=>"12345", "create"=>"message"}
pp mail.body # => (body with the {{...}} metas stripped)