Class: ICFS::Email::From
- Inherits:
-
Object
- Object
- ICFS::Email::From
- Defined in:
- lib/icfs/email/from.rb
Overview
Note:
Only use this in conjunction with some form of email spoofing prevention.
Receive email user based on FROM: header
Instance Method Summary collapse
-
#initialize(map) ⇒ From
constructor
New instance.
-
#receive(env) ⇒ Object
Extract the user based on the FROM: email.
Constructor Details
#initialize(map) ⇒ From
New instance
33 34 35 |
# File 'lib/icfs/email/from.rb', line 33 def initialize(map) @map = map end |
Instance Method Details
#receive(env) ⇒ Object
Extract the user based on the FROM: email.
41 42 43 44 45 46 |
# File 'lib/icfs/email/from.rb', line 41 def receive(env) email = env[:msg].from.first unam = @map[email] env[:user] = unam if unam return :continue end |