emailUpdate
public static bool emailUpdate(string token, array emailDetails)
Set an email as draft. This would clear its delivery schedule.
| Parameters |
| string token | A valid token for your account. To generate a token, use the login method. |
| array emailDetails | The array containing the email details.
| string id | The email campaign ID to update. You can get the emails from emailGet | | string fromName | Name displayed as "from" in your contact's in-box | | string fromEmail | Email displayed as "from address" in your contact's in-box | | string emailName | For your personal use; not displayed in your email | | string replyEmail | Replies are forwarded to this address | | string subject | Subject line of your email | | string templateContent | The content of email | | integer toListID | The contact list ID to whom this campaign is to be sent to. You can get the contact lists from listGet | | string us_address | optional. The Address line in case of a US based sender. Defaults to address information provided in the Client Settings | | string us_state | optional. The State in case of a US based sender. Defaults to address information provided in the Client Settings | | string us_city | optional. The City in case of a US based sender. Defaults to address information provided in the Client Settings | | string us_zip | optional. The Zip Code in case of a US based sender. Defaults to address information provided in the Client Settings | | string intl_address | optional. The Zip Code in case of a non-US based sender. Defaults to address information provided in the Client Settings | | bool webpageVersion | optional. Include a link to view a web version of the email. Defaults to false. | | string permissionReminderMessage | optional. A Permission reminder which appears on top of the email. Defaults to blank. | | string googleAnalyticsCampaign | optional. The Google Analytics campaign name. If provided, all links in the email will be enabled for tracking by Google Analytics. Defaults to blank. | | string scheduleDate | optional. The date on which the campaign is to be delivered. Defaults to 'Draft'. |
|
| Returns |
| bool | Update an existing email with the given details. |
- <?php
- /**
- This Example shows how to authenticate a user using XML-RPC.
- Note that we are using the PEAR XML-RPC client and recommend others do as well.
- **/
- require_once 'XML/RPC2/Client.php';
- require_once 'inc/config.php';
- $client = XML_RPC2_Client::create($apiURL);
- $token = $client->login($apiLogin, $apiPassword);
-
- /**
- Fetch the latest email, so we can retrieve the email ID.
- **/
- $emailList = $client->emailGet($token, "", 1, 1, "", "");
- $emailID = $emailList[0]['id'];
-
- $emailDetail['id'] = $emailID;
- $emailDetail['fromEmail'] = 'user1@____.com';
- $emailDetail['fromName'] = 'Steve';
- $emailDetail['emailName'] = 'Sales Promo May 09';
- $emailDetail['replyEmail'] = 'feedback@____.com;
- $emailDetail['subject'] = 'New Products launch at our store';
- $emailDetail['templateContent'] = $HTML_CONTENT;
- $emailDetail['toListID'] = $listID;
- $emailDetail['permissionReminderMessage'] = 'You are receiving this email because of your relationship with our company. Unsubscribe is available at the bottom of this email.';
- $allOk = $client->emailUpdate($token, $emailDetail);
- ?>