# Copyright (c) 2001 bivio Software, Inc. All rights reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: MailReceiveBaseForm.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ package Bivio::Biz::Model::MailReceiveBaseForm; use strict; $Bivio::Biz::Model::MailReceiveBaseForm::VERSION = sprintf('%d.%02d', q$Revision: 2.1 $ =~ /\d+/g); $_ = $Bivio::Biz::Model::MailReceiveBaseForm::VERSION; =head1 NAME Bivio::Biz::Model::MailReceiveBaseForm - field definitions for b-sendmail-http form =head1 RELEASE SCOPE bOP =head1 SYNOPSIS use Bivio::Biz::Model::MailReceiveBaseForm; =cut =head1 EXTENDS L =cut use Bivio::Biz::FormModel; @Bivio::Biz::Model::MailReceiveBaseForm::ISA = ('Bivio::Biz::FormModel'); =head1 DESCRIPTION C defines the fields sent by C, the bOP sendmail to http gateway. =cut #=IMPORTS #=VARIABLES =head1 METHODS =cut =for html =head2 execute_empty() It's fatal to receive an empty mail message form =cut sub execute_empty { my($self) = @_; $self->throw_die(Bivio::DieCode->CORRUPT_QUERY, 'empty form'); # DOES NOT RETURN } =for html =head2 internal_initialize() : hash_ref; Defines the following fields: =over 4 =item client_addr : Line The address of the SMTP originator. =item recipient : Line The name of the recipient (what comes after "_mail_receive/*") =item message : FileField The actual message received in RFC822 format. =back =cut sub internal_initialize { my($self) = @_; my($info) = { version => 2, visible => [ { name => 'client_addr', form_name => 'client_addr', type => 'Line', constraint => 'NOT_NULL', }, { name => 'recipient', form_name => 'recipient', type => 'Line', constraint => 'NOT_NULL', }, { name => 'message', form_name => 'message', type => 'FileField', constraint => 'NOT_NULL', }, ], }; return $self->merge_initialize_info( $self->SUPER::internal_initialize, $info); } #=PRIVATE METHODS =head1 COPYRIGHT Copyright (c) 2001 bivio Software, Inc. All rights reserved. Visit http://www.bivio.biz for more info. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; If not, you may get a copy from: http://www.opensource.org/licenses/lgpl-license.html =head1 VERSION $Id: MailReceiveBaseForm.pm,v 2.1 2006/10/16 21:08:04 moeller Exp $ =cut 1;