use LWP::UserAgent;
use HTTP::Request::Common;
use Email::Valid;
+use Carp qw(carp);
tie my %options, 'Tie::IxHash',
'url' => { label => 'URL', },
sub export_getstatus {
my( $self, $svc_x, $htmlref, $hashref ) = @_;
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp 'export_getstatus() suppressed by noexport_hack'
+ if $self->option('debug') || $DEBUG;
+ return;
+ }
+
my $url;
my $urlopt = $self->option('url');
no strict 'vars';
}
sub export_setstatus_listX {
- my( $self, $svc_x, $action, $list, $address ) = @_;
+ my( $self, $svc_x, $action, $list, $address_item ) = @_;
+
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp 'export_setstatus_listX() suppressed by noexport_hack'
+ if $self->option('debug') || $DEBUG;
+ return;
+ }
my $option;
if ( $list =~ /^[WA]/i ) { #Whitelist/Allow
}
$option .= $action. '_url';
- $address = Email::Valid->address($address)
- or die "address failed $Email::Valid::Details check.\n";
+ my $address;
+ unless ( $address = Email::Valid->address($address_item) ) {
+
+ if ( $address_item =~ /^(\@[\w\-\.]+\.\w{2,63})$/ ) { # "@domain"
+ $address = $1;
+ } else {
+ die "address failed $Email::Valid::Details check.\n";
+ }
+
+ }
#some false laziness w/export_getstatus above
my $url;
sub export_setstatus_vacationX {
my( $self, $svc_x, $action, $hr ) = @_;
+ if ( $FS::svc_Common::noexport_hack ) {
+ carp 'export_setstatus_vacationX() suppressed by noexport_hack'
+ if $self->option('debug') || $DEBUG;
+ return;
+ }
+
my $option = 'vacation_'. $action. '_url';
my $subject = uri_escape($hr->{subject});
}
1;
-
-1;