SpreadWebServcie.AddSubscriberByEmail Method

It adds a single subscriber into an existing subscription by his/her email.

public bool addSubscriberByEmail (

string loginEmail,

string password,

string subscriberEmail,

string subscription,

DoubleOptIn optInType

)

Public function addSubscriberByEmail( _

loginEmail As String, _

password As String, _

subscriberEmail As String, _

subscription As String, _

optInType As DoubleOptIn _

) As Boolean

No sample for PHP.
No sample.

Parameters

Parameter

Type

Description

loginEmail

String

The login email of your Spread account.

password

String

The password of your Spread account or API Key which you can retrieve from your Spread account (My account=> Settings).

subscriberEmail

String

The email of subscriber to be added.

subscription

String

The name of target subscription to be added.

optInType

DoubleOptIn

Double Opt-in option.

Return Value

When the HTTP status code is 200, it means the subscriber is added successfully.
true/false indicates whether the subscriber needs to confirm the subscription, see Double Opt-In

HTTP status code Retrun Message Status/Situation
200 true Add successfully, the subscriber needs to confirm subscription
200 false Add successfully, the subscriber does not need to confirm subscription
500 Spreader Email and Password not match! Please check if the parameters loginEmail and password are filled in incorrectly, and check the API Url (FAQ)
500 Subscription "xxxx" does not exist! The Subscription “xxxx” does not exist
500 Please provide a subscriber email. Parameter subscriberEmail is empty, please fill in this parameter
500 Email address "123@123" is not valid! email address format error
500 Fail to add subscriber. Failed to add subscriber, please contact technical staff.

Example

string loginName = "spread@reasonables.com";

string loginPassword = "TEST0000-TEST-0000-TEST-0000TEST0000";

string customerEmail = "test@reasonables.com";

string targetSubscription = "NoClone VIP";

DoubleOptIn addOption = DoubleOptIn.Off;

bool confirmIsNeeded;

 

//Create a SpreadWebService object and use its method.

SpreadWebService MySpread = new SpreadWebService();

 

confirmIsNeeded = MySpread.addSubscriberByEmail (loginName, loginPassword, customerEmail, targetSubscription, addOption);

Dim loginName As String = "spread@reasonables.com"

Dim loginPassword As String = "TEST0000-TEST-0000-TEST-0000TEST0000"

Dim customerEmail As String = "test@reasonables.com"

Dim targetSubscription As String = "NoClone VIP"

Dim addOption As DoubleOptIn = DoubleOptIn.Off

Dim confirmIsNeeded As Boolean

 

'Create a SpreadWebService object and use its method.

Dim MySpread As New SpreadWebService

 

confirmIsNeeded = MySpread.addSubscriberByEmail(loginName, loginPassword, customerEmail, targetSubscription, addOption)

/**
* @name     addSubscriberByEmail
* @function ad subscriber email address
* @return
*   'Subscription XXX does not exists!'                        
*   'Email address XXX is not valid!'                          
*   'LoginEmail and Password do not match'                     
*   'False'                                                    
*   'True'                                                     
*/
public function addSubscriberByEmail($loginEmail,$password,$subscriberEmail,$subscription,$optInType){
    $arrayPara = array(
                'loginEmail'      => $loginEmail,
                'password'        => $password,
                'subscriberEmail' => $subscriberEmail,
                'subscription'    => $subscription,
                'optInType'       => $optInType
            );
    $client = new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
    $result = $client->addSubscriberByEmail($arrayPara);
    return $result;
}
        
No sample.