SpreadWebServcie.AddSenderEmail Method

添加發送者郵箱地址.

參數

參數

類型

描述

loginEmail

String

Spread賬號的郵箱地址.

password

String

Spread賬號的密碼或者 API Key.

senderEmail

String

被添加的發送者郵箱地址.

返回結果

True - 成功.

False - 這個發送者郵箱地址已經存在.

例子

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.