SpreadWebServcie.Send Method

It send email one to one

Note: The contact will be automatically added to the contact list named "Auto_ + Current Date". This function allows duplicate sending, so the contact list may contains duplicate email. Don't use this contact list in other campaigns, if you want to avoid duplicate sending.

public String Send (

string LoginEmail,

string Password,

string From,

string FromName,

string To,

string Subject,

string Body

)

Public function send(

LoginEmail As String, _

Password As String, _

From As string, _

FromName As String, _

To As String, _

Subject As String, _

Body As String _

) As String

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).

From

String

The email address of sender.

FromName

String

The name of sender.

To

String

The email address of recipient.

Subject

String

The subject of the campaign.

Body

String

The content of the campaign. Support plain text or HTML tag

Return Value

String   represent the result of send status .

Example

string LoginEmail = "spread@reasonables.com";

string LoginPassword = "spread";

 

 //Define the from infomation

string From = "myedm@edm.com";

string FromName = "Reasonable";

 

//Define recipient email

string To = "noclone@reasonables.com"; 

 

//Define the email subject and body

string Subject = "NoClone 4 is released!"; 

string Body = "Download NoClone 4 at http://noclone.net now!";  

 

//Create a SpreadWebService object and use its method.

SpreadWebService MySpread = new SpreadWebService();

 

string result = MySpread.send(LoginEmail,LoginPassword,From,FromName,To,Subject,Body);

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

Dim LoginPassword As String = "spread"

 

  'Define the from infomation

Dim From As String = "myedm@edm.com"

Dim FromName As String= "Reasonable"

 

 'Define recipient email

Dim To As String= "noclone@reasonables.com"

 

 'Define the email subject and body

Dim Subject As String= "NoClone 4 is released!"

Dim Body As String= "Download NoClone 4 at http://noclone.net now!"

 

'Create a SpreadWebService object and use its method.

Dim MySpread As New SpreadWebService

Dim Result As String=MySpread.send(LoginEmail, LoginPassword, From,Fromname, To,Subject,Body)


/**
* @name     sendOne
* @function send email one by one
* @return
*   'Invalid Email Address'                                            
*   'Information required'                                             
*   'LoginEmail and Password do not match'                             
*   'Sent failed'                                                      
*   'Your email has submitted successfully and will by send out soon.' 
*   'Sent success'                                                     
*/
public function sendOne($loginEmail,$assword,$actName,$from,$fromName,$toEmail,$Msubject,$Mbody){
    $sendParam = array(
        'LoginEmail'    => $loginEmail,
        'Password'      => $password,
        'CampaignName'  => empty( $actName ) ? SITE_DOMAIN.'_act_'.date( 'Y-n-j' ) : $actName,
        'From'          => $from,
        'FromName'      => $fromName,
        'To'            => $toEmail,
        'Subject'       => $Msubject,
        'Body'          => $Mbody
    );
    $Client=new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
    error_log( json_encode( $sendParam )."__param" );
    $sendResult = $Client -> Send2( $sendParam ); 
    return $sendResult;
}
      
No sample.