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.
Section
Email Campaign Related Methods

Parameters
string tokenA valid token for your account. To generate a token, use the login method.
array emailDetailsThe array containing the email details.
string fromNameName displayed as "from" in your contact's in-box
string fromEmailEmail displayed as "from address" in your contact's in-box
string emailNameFor your personal use; not displayed in your email
string replyEmailReplies are forwarded to this address
string subjectSubject line of your email
string templateContentThe content of email
integer toListIDThe 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_addressoptional. The Address line in case of a US based sender. Defaults to address information provided in the Client Settings
string us_stateoptional. The State in case of a US based sender. Defaults to address information provided in the Client Settings
string us_cityoptional. The City in case of a US based sender. Defaults to address information provided in the Client Settings
string us_zipoptional. The Zip Code in case of a US based sender. Defaults to address information provided in the Client Settings
string intl_addressoptional. The Zip Code in case of a non-US based sender. Defaults to address information provided in the Client Settings
bool webpageVersionoptional. Include a link to view a web version of the email. Defaults to false.
string permissionReminderMessageoptional. A Permission reminder which appears on top of the email. Defaults to blank.
string googleAnalyticsCampaignoptional. The Google Analytics campaign name. If provided, all links in the email will be enabled for tracking by Google Analytics. Defaults to blank.
string scheduleDateoptional. The date on which the Rss campaign will start. Defaults to 'Draft'.
string rssintervaloptional. Interval for the Rss campaign. Defaults to '0', accepted values are 1 , 7 , 30.

Returns
stringReturns the email ID of the newly created email campaign.


Examples
download example code
xmlrpc_emailRssCreate.php


  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10.  
  11. /**
  12. Fetch the latest contact list ID, so we can retrieve the target contact list ID.
  13. **/
  14. $contactList = $client->listGet($token, "", 1, 1, "", "");
  15. $listID = $contactList[0]['id'];
  16.  
  17. $emailDetail['fromEmail'] = 'user1@____.com';
  18. $emailDetail['fromName'] = 'Steve';
  19. $emailDetail['emailName'] = 'Sales Promo May 09';
  20. $emailDetail['replyEmail'] = 'feedback@____.com;
  21. $emailDetail['subject'] = 'New Products launch at our store';
  22. $emailDetail['templateContent'] = $HTML_CONTENT;
  23. $emailDetail['toListID'] = $listID;
  24. $emailDetail['scheduleDate'] = '1 May 2009 5:00'; /* In UTC */
  25. $emailDetail['rssinterval'] = '7'; /* In UTC */
  26. $emailDetail['rssurl'] = 'http://www.yourrssfeeds.com/';
  27. $emailDetail['webpageVersion'] = true;
  28. $emailDetail['permissionReminderMessage'] = 'You are receiving this email because of your relationship with our company. Unsubscribe is available at the bottom of this email.';
  29. $newEmailID = $client->emailRssCreate($token, $emailDetail);
  30. ?>