The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::MailChimp - Perl library with MINIMAL interface to use MailChimp API.

SYNOPSIS

use Net::MailChimp;

my $mc = Net::MailChimp->new(
    api_key         => 'xxxxxxxx'
    dc              => 'us21',
    version         => '3.0',      # Optional, default is 3.0
);

my $res;

# md5address() turns lowerscase and returns MD5, as MailChimp wants
my $mailhash = $mc->md5address('test@test.com');

my $res = $mch->request('lists/00000/members/'.$mailhash, 'GET');
# The module will never die, as most MailChimp errors require processing by the caller
say $res->{message} if $res->{httpstatus};
say $res->{status}; # subscribed, pending, unsubscribed, cleaned

$mch->request('lists/00000/members/',  'POST', {
    email_address   => 'test2@test.com',
    {
        status      => 'pending',
        merge_fields => {
            FNAME       => 'Test1',
        }
    }
});

DESCRIPTION

This is HIGHLY EXPERIMENTAL and in the works, do not use for now.

AUTHOR

Michele Beltrame, mb@blendgroup.it

LICENSE

This library is free software under the Artistic License 2.0.