emailRssCreate
public static string emailRssCreate(string token, array emailDetails)
Create a new Email based on the details provided. Return the ID of the newly created Email.
| 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 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 rssurl | Url for the Rss Feed | | 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 Rss campaign will start. Defaults to 'Draft'. | | string rssinterval | optional. Interval for the Rss campaign. Defaults to '0', accepted values are 1 , 7 , 30. |
|
| Returns |
| string | Returns the email ID of the newly created email campaign. |
- <?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 contact list ID, so we can retrieve the target contact list ID.
- **/
- $contactList = $client->listGet($token, "", 1, 1, "", "");
- $listID = $contactList[0]['id'];
-
- $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['scheduleDate'] = '1 May 2009 5:00'; /* In UTC */
- $emailDetail['rssinterval'] = '7'; /* In UTC */
- $emailDetail['rssurl'] = 'http://www.yourrssfeeds.com/';
- $emailDetail['webpageVersion'] = true;
- $emailDetail['permissionReminderMessage'] = 'You are receiving this email because of your relationship with our company. Unsubscribe is available at the bottom of this email.';
- $newEmailID = $client->emailRssCreate($token, $emailDetail);
- ?>