Bivio::Biz::Model::MailReceiveBaseForm
# Copyright (c) 2001 bivio Software, Inc. All rights reserved.
# $Id$
package Bivio::Biz::Model::MailReceiveBaseForm;
use strict;
use Bivio::Base 'Biz.FormModel';
# NAME
#
# Bivio::Biz::Model::MailReceiveBaseForm - field definitions for b-sendmail-http form
#
# RELEASE SCOPE
#
# bOP
#
# SYNOPSIS
#
# use Bivio::Biz::Model::MailReceiveBaseForm;
#
# EXTENDS
#
# Bivio::Biz::FormModel
#
# DESCRIPTION
#
#
Bivio::Biz::Model::MailReceiveBaseForm
defines the fields sent by
# b-sendmail-http
, the bOP sendmail to http gateway.
#
#=IMPORTS
#=VARIABLES
# METHODS
#
#
# execute_empty()
#
# It's fatal to receive an empty mail message form
#
sub execute_empty {
my($self) = @_;
$self->throw_die(Bivio::DieCode->CORRUPT_QUERY, 'empty form');
# DOES NOT RETURN
}
#
# internal_initialize() : hash_ref;
#
# Defines the following fields:
#
#
# client_addr : Line
#
# The address of the SMTP originator.
#
# recipient : Line
#
# The name of the recipient (what comes after "_mail_receive/*")
#
# message : FileField
#
# The actual message received in RFC822 format.
#
#
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
# COPYRIGHT
#
# Copyright (c) 2001 bivio Software, Inc. All rights reserved.
#
# VERSION
#
# $Id$
#
1;