+sub check_freq_labels {
+
+ tie my %hash, 'Tie::IxHash',
+ 0 => 'Never',
+ 60 => 'minute',
+ 120 => '2 minutes',
+ 180 => '3 minutes',
+ 300 => '5 minutes',
+ 600 => '10 minutes',
+ 900 => '15 minutes',
+ 1800 => '30 minutes',
+ 3600 => 'hour',
+ 7200 => '2 hours',
+ 10800 => '3 hours',
+ 21600 => '6 hours',
+ 43200 => '12 hours',
+ 86400 => 'day',
+ 172800 => '2 days',
+ 259200 => '3 days',
+ 604800 => 'week',
+ 1000000000 => 'Disabled',
+ ;
+
+ \%hash;
+}
+
+=item cgp_hashref
+
+Returns a hashref representing this external mail account, suitable for
+Communigate Pro API commands:
+
+=cut
+
+sub cgp_hashref {
+ my $self = shift;
+ {
+ 'authName' => $self->username,
+ 'domain' => $self->machine,
+ 'password' => $self->_password,
+ 'period' => $self->check_freq.'s',
+ 'APOP' => ( $self->apop eq 'Y' ? 'YES' : 'NO' ),
+ 'TLS' => ( $self->tls eq 'Y' ? 'YES' : 'NO' ),
+ 'Leave' => ( $self->leavemail eq 'Y' ? 'YES' : 'NO' ), #XXX leave??
+ };
+}
+