# Copyright (c) 2010 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: RealmMailBase.pm,v 2.4 2011/05/03 18:57:37 moeller Exp $ package Bivio::Biz::Action::RealmMailBase; use strict; use Bivio::Base 'Biz.Action'; our($VERSION) = sprintf('%d.%02d', q$Revision: 2.4 $ =~ /\d+/g); my($_M) = b_use('Biz.Model'); sub format_email_for_realm { my($proto, $req_or_realm) = @_; my($realm, $req) = $_M->is_blessed($req_or_realm) ? ($req_or_realm, $req_or_realm->req) : ($req_or_realm->req(qw(auth_realm owner)), $req_or_realm); return $_M->new($req, 'MailReceiveDispatchForm') ->format_recipient( #TODO: This needs to be coupled with the actual task's uri, not the constant here $realm->get('name'), $proto->TASK_URI, ); } sub want_realm_mail_created { return 1; } sub want_reply_to { return 1; } 1;