ElasticEmail
view release on metacpan or search on metacpan
lib/ElasticEmail.pm view on Meta::CPAN
newName => shift];
return $Api::mainApi->Request('channel/update', "GET", \@params);
}
#
# Methods used to manage your Contacts.
#
package Api::Contact;
# Activate contacts that are currently blocked.
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# bool activateAllBlocked - Activate all your blocked contacts. Passing True will override email list and activate all your blocked contacts. (default False)
# IEnumerable<string> emails - Comma delimited list of contact emails (default None)
sub ActivateBlocked
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
activateAllBlocked => shift,
emails => shift];
return $Api::mainApi->Request('contact/activateblocked', "GET", \@params);
}
# Add a new contact and optionally to one of your lists. Note that your API KEY is not required for this call.
# string publicAccountID - Public key for limited access to your account such as contact/add so you can use it safely on public websites.
# string email - Proper email address.
# string[] publicListID - ID code of list (default None)
# string[] listName - Name of your list. (default None)
# string title - Title (default None)
# string firstName - First name. (default None)
# string lastName - Last name. (default None)
lib/ElasticEmail.pm view on Meta::CPAN
activationReturnUrl => shift,
activationTemplate => shift,
sendActivation => shift,
consentDate => shift,
consentIP => shift,
field => shift,
notifyEmail => shift];
return $Api::mainApi->Request('contact/add', "GET", \@params);
}
# Manually add or update a contacts status to Abuse, Bounced or Unsubscribed status (blocked).
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# string email - Proper email address.
# ApiTypes::ContactStatus status - Name of status: Active, Engaged, Inactive, Abuse, Bounced, Unsubscribed.
sub AddBlocked
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
email => shift,
status => shift];
return $Api::mainApi->Request('contact/addblocked', "GET", \@params);
}
# Change any property on the contact record.
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# string email - Proper email address.
# string name - Name of the contact property you want to change.
# string value - Value you would like to change the contact property to.
sub ChangeProperty
{
shift;
lib/ElasticEmail.pm view on Meta::CPAN
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
rule => shift,
allContacts => shift,
limit => shift,
offset => shift];
return $Api::mainApi->Request('contact/list', "GET", \@params);
}
# Load blocked contacts
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# IEnumerable<ApiTypes::ContactStatus> statuses - List of comma separated message statuses: 0 or all, 1 for ReadyToSend, 2 for InProgress, 4 for Bounced, 5 for Sent, 6 for Opened, 7 for Clicked, 8 for Unsubscribed, 9 for Abuse Report
# string search - List of blocked statuses: Abuse, Bounced or Unsubscribed (default None)
# int limit - Maximum of loaded items. (default 0)
# int offset - How many items should be loaded ahead. (default 0)
# Returns List<ApiTypes::BlockedContact>
sub LoadBlocked
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
statuses => shift,
search => shift,
limit => shift,
offset => shift];
return $Api::mainApi->Request('contact/loadblocked', "GET", \@params);
}
# Load detailed contact information
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# string email - Proper email address.
# Returns ApiTypes::Contact
sub LoadContact
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
lib/ElasticEmail.pm view on Meta::CPAN
campaignID => shift,
listName => shift,
statuses => shift];
return $Api::mainApi->Request('list/createfromcampaign', "GET", \@params);
}
# Create a series of nth selection lists from an existing list or segment
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# string listName - Name of your list.
# int numberOfLists - The number of evenly distributed lists to create.
# bool excludeBlocked - True if you want to exclude contacts that are currently in a blocked status of either unsubscribe, complaint or bounce. Otherwise, false. (default True)
# bool allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default False)
# string rule - Query used for filtering. (default None)
# bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
sub CreateNthSelectionLists
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
listName => shift,
numberOfLists => shift,
excludeBlocked => shift,
allowUnsubscribe => shift,
rule => shift,
allContacts => shift];
return $Api::mainApi->Request('list/createnthselectionlists', "GET", \@params);
}
# Create a new list with randomized contacts from an existing list or segment
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# string listName - Name of your list.
# int count - Number of items.
# bool excludeBlocked - True if you want to exclude contacts that are currently in a blocked status of either unsubscribe, complaint or bounce. Otherwise, false. (default True)
# bool allowUnsubscribe - True: Allow unsubscribing from this list. Otherwise, false (default False)
# string rule - Query used for filtering. (default None)
# bool allContacts - True: Include every Contact in your Account. Otherwise, false (default False)
# Returns int
sub CreateRandomList
{
shift;
my @params = [apikey => $Api::mainApi->{apikey},
listName => shift,
count => shift,
excludeBlocked => shift,
allowUnsubscribe => shift,
rule => shift,
allContacts => shift];
return $Api::mainApi->Request('list/createrandomlist', "GET", \@params);
}
# Deletes List and removes all the Contacts from it (does not delete Contacts).
# string apikey - ApiKey that gives you access to our SMTP and HTTP API's.
# string listName - Name of your list.
sub Delete
lib/ElasticEmail.pm view on Meta::CPAN
# Cost of 1000 emails
#
CostPerThousand => shift,
#
# Number of messages in progress
#
InProgressCount => shift,
#
# Number of contacts currently with blocked status of Unsubscribed, Complaint, Bounced or InActive
#
BlockedContactsCount => shift,
#
# Numeric reputation
#
Reputation => shift,
#
# Number of contacts
#
ContactCount => shift,
lib/ElasticEmail.pm view on Meta::CPAN
# Size of your attachment.
#
Size => shift,
};
bless $self, $class;
return $self;
}
#
# Blocked Contact - Contact returning Hard Bounces
#
package ApiTypes::BlockedContact;
sub new
{
my $class = shift;
my $self = {
#
# Proper email address.
#
Email => shift,
#
( run in 0.946 second using v1.01-cache-2.11-cpan-49f99fa48dc )