Christopher J. Madsen > WebService-NFSN-0.08 > WebService::NFSN::Email

Download:
WebService-NFSN-0.08.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.05   Source  

NAME ^

WebService::NFSN::Email - Access NFSN email forwarding

VERSION ^

This document describes version 0.05 of WebService::NFSN::Email, released September 28, 2008 as part of WebService-NFSN version 0.08.

SYNOPSIS ^

    use WebService::NFSN;

    my $nfsn = WebService::NFSN->new($USER, $API_KEY);
    my $email = $nfsn->email($DOMAIN);
    $email->setForward(forward => 'name',
                       dest_email => 'to@example.com');

DESCRIPTION ^

WebService::NFSN::Email provides access to NearlyFreeSpeech.NET's email forwarding API. It is only useful to people who have NearlyFreeSpeech.NET's email forwarding service.

INTERFACE ^

$email = $nfsn->email($DOMAIN)

This constructs a new Email object for the specified $DOMAIN (like 'example.com'). Equivalent to $email = WebService::NFSN::Email->new($nfsn, $DOMAIN).

Properties

None.

Methods

$email->listForwards()

Returns a hash reference listing all forwarding instructions for this domain. For each entry, the key is the username and the value is the forwarding address for that name. The special username * represents the "Everything Else" entry.

$email->removeForward(forward => $NAME)

Removes forwarding instructions from "$NAME\@$DOMAIN".

$email->setForward(forward => $NAME, dest_email => $TO)

This method is used to create a new email forward or update an existing one. $NAME is only the username component, so if you have example.com and you want to set up an email forward for forwarding testuser@example.com to realuser@example.net then you would pass testuser as $NAME and realuser@example.net as $TO.

If $NAME already had a forwarding address, it will be overwritten with the new $TO.

To cause an email address to bounce, forward it to bounce@nearlyfreespeech.net. To cause it to be silently discarded, forward it to discard@nearlyfreespeech.net.

SEE ALSO ^

WebService::NFSN