printf("Alias after expanding options: %s\n", $use_alias);
# URL-encode any plus-signs in the address...
-$use_alias =~ s/\+/\%2B/g;
+#$use_alias =~ s/\+/\%2B/g;
+# Seems to not be needed, am I doing this somewhere else?
undef $data;
# run alias/list with alias=$use_alias, expect an empty list
$aliases[0]->{'destination'}, $username . "@" . $domain
);
}
+ undef $data;
+ $data = exec_apinode("alias/remove", { 'alias' => $use_alias });
+ # fail unless OK is returned.
+ if ( not $data->{'response'} eq 'ok' )
+ {
+ printf("Unable to remove alias, Hermes response is: %s\n", $data->{'cause'});
+ logout();
+ exit;
+ }
+ printf("Removed alias %s.\n", $data->{'alias'} );
}
logout();