- if( $old->email ne $new->email && $self->option('fax') ) {
- my $result = $self->vitelity_command('changeemail',
- 'did' => $old->phonenum,
- 'emails' => $new->email ? $new->email : '',
- );
- if ( $result ne 'ok' ) {
- return "Error running Vitelity changeemail: $result";
- }
+ if ( $old->email ne $new->email && $self->option('fax') ) {
+ my $result = $self->vitelity_command('changeemail',
+ 'did' => $old->phonenum,
+ 'emails' => $new->email ? $new->email : '',
+ );
+ if ( $result ne 'ok' ) {
+ return "Error running Vitelity changeemail: $result";
+ } elsif ( $self->option('debug') ) {
+ warn "Vitelity response: $result";
+ }