Skip Navigation Links.
展开 最小化

SpreadWebServcie.AddSenderEmail Method

Add Sender Email .

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

senderEmail

String

The sender email.

Return Value

True - success

False - The sender email is exists.

Example

string loginEmail = "Spread@reasonables.com";

string loginPassword = "Spread";

string senderEmial = "Send1@reasonables.com";

SpreadAPI.SpreadWebService MySpread = new SpreadAPI.SpreadWebService();

bool result = MySpread.AddSenderEmail(loginEmail, loginPassword, senderEmial);

Dim loginEmail As String = "Spread@reasonables.com"

Dim loginPassword As String = "Spread"

Dim senderEmial As String = "Send1@reasonables.com"

Dim MySpread As New SpreadAPI.SpreadWebService

Dim result As Boolean = MySpread.AddSenderEmail(loginEmail, loginPassword, senderEmial)


    /**
    * @name     addSendUser
    * @function add sender email address
    * @param
    *  sender	the email address you want to set as sender
    * @return
    *  -1       failed,you have alerady added this email address as sender.
    *  0        success.
    */
    public function addSendUser($loginEmail,$password,$sender ){
        $sendArr = array(
	        'loginEmail' => $loginEmail,
	        'password'	 => $password,
	        'SenderEmail'=> $sender
        );
        $Client=new SoapClient("http://service.rspread.com/Service.asmx?WSDL");
        $flag = $Client -> AddSenderEmail( $sendArr );
        if( empty( $flag ) ){
	        return -1;
        }
        return 0;
    }

         
No sample.