Class: Rex::Proto::Mms::Model::Message
- Inherits:
- 
      Object
      
        - Object
- Rex::Proto::Mms::Model::Message
 
- Defined in:
- lib/rex/proto/mms/model/message.rb
Instance Attribute Summary collapse
- 
  
    
      #attachment  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The loaded attachment converted to Base64. 
- 
  
    
      #attachment_name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The attachment base name extracted from :attachment. 
- 
  
    
      #content_type  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The content type of the attachment. 
- 
  
    
      #from  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The from field in the email. 
- 
  
    
      #message  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The text message. 
- 
  
    
      #subject  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The subject of the email. 
- 
  
    
      #to  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The to field in the email. 
Instance Method Summary collapse
- 
  
    
      #initialize(opts = {})  ⇒ Rex::Proto::Mms::Model::Message 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes the SMTP object. 
- 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns the raw MMS message. 
Constructor Details
#initialize(opts = {}) ⇒ Rex::Proto::Mms::Model::Message
Initializes the SMTP object.
| 49 50 51 52 53 54 55 56 57 58 59 | # File 'lib/rex/proto/mms/model/message.rb', line 49 def initialize(opts={}) self.from = opts[:from] self.to = opts[:to] self. = opts[:message] self.subject = opts[:subject] self.content_type = opts[:content_type] if opts[:attachment_path] self. = load_file_to_base64(opts[:attachment_path]) self. = File.basename(opts[:attachment_path]) end end | 
Instance Attribute Details
#attachment ⇒ String
Returns The loaded attachment converted to Base64.
| 20 21 22 | # File 'lib/rex/proto/mms/model/message.rb', line 20 def @attachment end | 
#attachment_name ⇒ String
Returns The attachment base name extracted from :attachment.
| 36 37 38 | # File 'lib/rex/proto/mms/model/message.rb', line 36 def @attachment_name end | 
#content_type ⇒ Fixnum
Returns The content type of the attachment.
| 16 17 18 | # File 'lib/rex/proto/mms/model/message.rb', line 16 def content_type @content_type end | 
#from ⇒ String
Returns The from field in the email.
| 24 25 26 | # File 'lib/rex/proto/mms/model/message.rb', line 24 def from @from end | 
#message ⇒ String
Returns The text message.
| 12 13 14 | # File 'lib/rex/proto/mms/model/message.rb', line 12 def @message end | 
#subject ⇒ String
Returns The subject of the email.
| 32 33 34 | # File 'lib/rex/proto/mms/model/message.rb', line 32 def subject @subject end | 
#to ⇒ String
Returns The to field in the email.
| 28 29 30 | # File 'lib/rex/proto/mms/model/message.rb', line 28 def to @to end | 
Instance Method Details
#to_s ⇒ String
Returns the raw MMS message
| 65 66 67 | # File 'lib/rex/proto/mms/model/message.rb', line 65 def to_s end |