diff options
author | jeff <jeff> | 2006-10-14 21:13:30 +0000 |
---|---|---|
committer | jeff <jeff> | 2006-10-14 21:13:30 +0000 |
commit | 3e8bc1837343e34bac7106be458add3982fb77da (patch) | |
tree | 3065e099ce9da405ff6584dc180e0f0d824df94a /lib/Net/Plesk/Method/mail_set.pm |
Initial importstart
Diffstat (limited to 'lib/Net/Plesk/Method/mail_set.pm')
-rw-r--r-- | lib/Net/Plesk/Method/mail_set.pm | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/lib/Net/Plesk/Method/mail_set.pm b/lib/Net/Plesk/Method/mail_set.pm new file mode 100644 index 0000000..df574f8 --- /dev/null +++ b/lib/Net/Plesk/Method/mail_set.pm @@ -0,0 +1,96 @@ +package Net::Plesk::Method::mail_set; + +use strict; + +use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG ); + +@ISA = qw( Net::Plesk::Method ); +$VERSION = '0.01'; + +$DEBUG = 0; + +=head1 NAME + +Net::Plesk::Method::mail_set - Perl extension for Plesk XML Remote API mailbox setting + +=head1 SYNOPSIS + + use Net::Plesk::Method::mail_set + + my $p = new Net::Plesk::Method::mail_set + ( $domainID, $mailbox, $passwd, $enabled ); + + $request = $p->endcode; + +=head1 DESCRIPTION + +This module implements an interface to construct a request for setting a +mailbox using SWSOFT's Plesk. + +=head1 METHODS + +=over 4 + +=item init args ... + +Initializes a Plesk mail_set object. The I<domainID>, I<mailbox>, and +I<password> options are required. + +=cut + +sub init { + my ($self, $domainid, $mailbox, $password, $enabled) = @_; + my $enabledflag = $enabled ? "true" : "false"; + $$self = join ( "\n", ( + '<mail>', + '<update>', + '<set>', + '<filter>', + '<domain_id>', + $self->encode($domainid), + '</domain_id>', + '<mailname>', + '<name>', + $self->encode($mailbox), + '</name>', + '<mailbox>', + '<enabled>', + $self->encode($enabledflag), + '</enabled>', + '</mailbox>', + '<password>', + $self->encode($password), + '</password>', + '</mailname>', + '</filter>', + '</set>', + '</update>', + '</mail>', + )); +} + +=back + +=head1 BUGS + + Creepy crawlies. + +=head1 SEE ALSO + +SWSOFT Plesk Remote API documentation (1.4.0.0 or later) + +=head1 AUTHOR + +Jeff Finucane E<lt>jeff@cmh.netE<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2006 Jeff Finucane + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut + +1; + |