Blacklist addEmails

From Catglobe Wiki
Revision as of 07:57, 4 August 2017 by Nguyenduyan (talk | contribs) (Created page with " Category:Blacklist {{HelpFiles}} = Blacklist_addEmails = Add emails to blacklist == Syntax == Blacklist_addEmails(array emails); == Arguments == ''emails'': array....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Blacklist_addEmails

Add emails to blacklist

Syntax

Blacklist_addEmails(array emails);

Arguments

emails: array. Array of emails.

There are 2 ways of using:

1. Each email is an EmailBlacklist object

2. Each email is an array with pair of email and comment

Return type

Number. Number of emails added to Blacklist

Example

//Way 1: Each email is an EmailBlacklist object
EmailBlacklist email1 = new EmailBlacklist ("email1@test.com", "comment1");
EmailBlacklist email2 = new EmailBlacklist ("email28@test.com", "comment2");
array emails = {email1, email2};
Blacklist_addEmails(emails);//2

//Way 2: Each email is an array with pair of email and comment 
array email1 = {"email1@test.com", "comment2"};
array email2 = {"email2@test.com", "comment2"};
array emails = {email1, email2};
Blacklist_addEmails(emails);//2