7

I want to sent a mail through single list every week.html mail and text mail both.

It is possible to create one list like "12548" and add the different user like "abc@gmail.com","xys@yahoo.com", ....

Sent the one html newsletter for one user. Means different user for different html newsletter. Can I do this with the fuel sdk (php) ?

  • If you send to a list, you will have to dynamically change the newsletter. I'm not really understanding your use case - could you be more specific? – Kelly J Andrews Dec 21 '13 at 19:04
  • I have one list like "Newsletter" and this list(Newsletter) having 5000 users.How i send the newsletter to every user.So i want to send the newsletter to every user with different html newsletter.Any help is very much appreciated. – Deepak Dec 22 '13 at 17:17
  • How different is your newsletter? Are there 5000 separate designs? Is there one design with different content? Where will each users newsletter get created? I'm not fully understanding. I have several ways to approach the solution, I'm just not sure what all is going on. I need more detail. – Kelly J Andrews Dec 22 '13 at 17:37
  • Yes,every 5000 users having separate newsletter.Each users having own newsletter.I am using this concept code.exacttarget.com/getting-started but i want to one list and send newsletter to every user to different newletter. – Deepak Dec 22 '13 at 17:51
  • Ok. This will be a lengthy explanation. I'll try to get it all together for you. – Kelly J Andrews Dec 22 '13 at 19:14
3

What you are looking to do is create a dynamic newsletter - which is something ExactTarget can send with ease. There are a few steps to be able to reproduce the scenario you are hoping to accomplish, based on the sample emails you linked to.

Segmentation

First off, you will need to make some decisions on how your list will be segmented. In other words, how will you determing each of your individual subscribers different than one another. Perhaps this is by location, or interest. You will want to set these up in the account as attributes for subscribers. To add additional attributes in an account using the FuelSDK-PHP, the code samples are provided here

$myclient = new ET_Client();
$response = $myclient->CreateProfileAttributes(array("ExampleAttributeOne","ExampleAttributeTwo"));

Lists

Create your list inside of your ExactTarget account either through the UI directly, or using the FuelSDK as well. More code examples are provided here. The code sample below creates a private list, however if you want your list to be publicly available on the profile center, you would set this to public.

$list = new ET_List();
$list->authStub = $myclient;
$list->props = array("ListName" => "MyEmailList", "Description" => "This list was created with the PHPSDK", "Type" => "Private");
$response = $list->post();

Subscribers

As you add your subscribers, you will want to add the attribute information that applies to your segmentation. Performing these tasks as an import directly to ExactTarget is the best practice for large lists, however, you can add subscribers in smaller quantities using the FuelSDK. More examples of how to add subscribers

    $subs = array();
    $subs[] = array("EmailAddress" => "someone1@emailserviceprovider.com", "Attributes" => array(array("Name"=>"ExampleAttributeOne", "Value"=>"ONE"),array("Name"=>"ExampleAttributeTwo", "Value"=>"TWO")));
    $subs[] = array("EmailAddress" => "someone2@emailserviceprovider.com", "Attributes" => array(array("Name"=>"ExampleAttributeOne", "Value"=>"ONE"),array("Name"=>"ExampleAttributeTwo", "Value"=>"TWO"))); 
    $response = $myclient->AddSubscribersToLists($subs, array(YOUR LIST ID HERE)); 

Email

Creating dynamic emails with the SDK is one way to approach your use case. There are others, but they are beyond the scope of this question, and I will address only this method. One piece you would want to learn more of is AMP scripting, which helps drive content based on data. I will provide a very simple demonstration here, so you can get a general understanding of how things work. More SDK examples for creating emails with the SDK are located here.

    $postEmail = new ET_Email();
    $postEmail->authStub = $myclient;
    $postEmail->props = array("CustomerKey" => "my_email_key", "Name"=>"My Email Name", "Subject"=>"My Email Subject",  "HTMLBody"=> "%%[IF ExampleAttributeOne == X THEN]%%<b>Show Content for X</b>%%[ELSE]%%<b>Show Content for Y</b>%%[ENDIF]%%",  "EmailType" => "HTML", "IsHTMLPaste" => "true");
    $postResult = $postEmail->post();

This is a very simple example, but should allow you to get a better idea of how ExactTarget handles it's dynamic content. You can also approach this using data extensions and calling data from there, creating content areas that are reusable, or creating automations for this to be sent reguraly with out any interaction. Much of these architecture decisions will depend on your use case individually, as well as other factors like location of content, data, etc. As you work through your use case, be sure to choose the simplest approach for scalability and maitenance.

Sending

Once you have your list, subscribers, and email, all you need to do is send to your list. The FuelSDK makes this really easy, and code samples are provided here.

    $send = array();
    $send["Email"] = array("ID"=> YOUR EMAIL ID);
    $send["List"] = array("ID"=> YOUR LIST ID);
    $response = new ET_Post($this->authStub, "Send", $send);

This will send your email previously created to your list of subscribers.

As a general rule, try to get your data as flat as possible, and perform as little AMP script as possible to create the dynamic sends. Most developers find it useful to do some work in the UI prior to going full API, but it's not required.

This is by far not an extensive, 100% guide to sending with ExactTarget, as there are so many capabilities, but should give you a great start to developing some exciting campaigns.

| improve this answer | |
  • Hi,My all subscribers different from each other.First I am creating the html newsletter then sending the mail to each subscriber its newsletter.If I am creating the only one list and then adding different subscriber into the list.I am sending mail using this code $response = new ET_Post($client, 'Send', array("List" => array("ID" => $listID), "Email" => array("CustomerKey" => $customer_key))); => it is sending the same html email to all subscriber.I have more than 5000 subscribers.I think in AMP script it's may be difficult to integrate with this concept. – Deepak Dec 24 '13 at 14:01
  • AMP script is the best way to perform dynamic emails. The AMP script will dynamically change the email based on user attributes and preferences. Sending completely different HTML per user is going to slow down send speeds, and leaves a lot of room for errors and problems. The samples you have shown, use a lot of the same HTML, with differences in some areas. Those areas would be controlled using AMP script. This really is your best approach, and it's driving some of the most sophisticated sends going out of ExactTarget. – Kelly J Andrews Dec 24 '13 at 14:18
  • My all subscribers different from each other.No some difference from each other.I have an idea. ---Creating subscriber and it is added to the main List.Then creating one temporary List and adding subscriber to it.Sending email with respective user.Deleting temporary List.What about say.plz let me know if any other method. – Deepak Dec 24 '13 at 18:20
  • I would ask you try some variations to see how things work, and then respond here with more specific questions. The above method of sending works for the majority of the use cases, including yours. Unfortunately, I'm not going to be able to completely build out sample code for your entire solution, but I assure you that the above process will set you up for success. – Kelly J Andrews Dec 24 '13 at 18:25
  • When I am creating the "CreateProfileAttributes" it give the error "67035 PropertyDefinitionReadOnlyAccess". – Deepak Dec 25 '13 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.