/[notice-sender]/trunk/Nos.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/Nos.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 75 by dpavlin, Wed Aug 24 21:27:40 2005 UTC revision 76 by dpavlin, Wed Aug 24 22:11:00 2005 UTC
# Line 727  Returns all received messages for given Line 727  Returns all received messages for given
727          email => "john.doe@example.com",          email => "john.doe@example.com",
728   );   );
729    
730  This method is used by C<sender.pl> when receiving e-mail messages.  Each element in returned array will have following structure:
731    
732     {
733            id => 42,                       # unique ID of received message
734            list => 'My list',              # useful only of filtering by email
735            ext_id => 9999,                 # ext_id from message user
736            email => 'jdoe@example.com',    # e-mail of user
737            bounced => 0,                   # true value if message is bounce
738            date => '2005-08-24 18:57:24',  # date of recival in ISO format
739     }
740    
741    
742  =cut  =cut
743    
# Line 741  sub received_messages { Line 751  sub received_messages {
751          $arg->{'list'} = lc($arg->{'list'});          $arg->{'list'} = lc($arg->{'list'});
752          $arg->{'email'} = lc($arg->{'email'});          $arg->{'email'} = lc($arg->{'email'});
753    
754          my $rcvd = $self->{'loader'}->find_class('received')->search_received();          my @out;
755    
756          return $rcvd;          my $sth = $self->{'loader'}->find_class('received')->sql_received;
757            $sth->execute();
758            return $sth->fetchall_hash;
759  }  }
760    
761    
# Line 1152  This is a stub for documentation of unim Line 1164  This is a stub for documentation of unim
1164    
1165  You can specify just C<list> or C<email> or any combination of those.  You can specify just C<list> or C<email> or any combination of those.
1166    
1167  It will return array of hashes with following structure:  For format of returned array element see C<received_messages>.
   
  {  
         id => 42,                       # unique ID of received message  
         list => 'My list',              # useful only of filtering by email  
         ext_id => 9999,                 # ext_id from message user  
         email => 'jdoe@example.com',    # e-mail of user  
         bounced => 0,                   # true value if message is bounce  
         date => '2005-08-24 18:57:24',  # date of recival in ISO format  
  }  
1168    
1169  =head2 MessagesReceivedByDate  =head2 MessagesReceivedByDate
1170    

Legend:
Removed from v.75  
changed lines
  Added in v.76

  ViewVC Help
Powered by ViewVC 1.1.26