App::SpamcupNG::UserAgent - the SpamcupNG HTTP user agent



This class is responsible to interact with the Spamcop website, providing requests and returning the HTML responses.



Creates a new instance.

Expects as parameter:

- version: a string of the version of SpamcupNG.

Returns a new instance.


Returns a string with the HTTP header user-agent that will be used by the inner HTTP user agent.


Execute the login to Spamcop website.

If form based authentication is in use, it will login just once and return the response of HTTP GET to Spamcop root URL.

Expect as parameters:

  • id: the ID of a Spamcop account.

  • password: the password of a Spamcop account.

Returns the HTTP response (HTML content) as a scalar reference.


Fetches a SPAM report.

Expects as parameter a report ID.

Returns the HTML content as a scalar reference.


Returns the current base URL provided by the last response of getting a SPAM report.


Complete the SPAM report, by confirming it's information is OK.

Returns the HTML content as a scalar reference.


Alceu Rodrigues de Freitas Junior, <>


This software is copyright (c) 2018 of Alceu Rodrigues de Freitas Junior, <>

This file is part of App-SpamcupNG distribution.

App-SpamcupNG is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

App-SpamcupNG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with App-SpamcupNG. If not, see <>.