2

We have a microsite with a SmartCapture form for a new subscriber to select (via radio buttons) to receive one of 3 options. The choices are: list-optionA, list-optionB, both list-optionA/optionB.

A data extension and triggered Send have also been created for the on-submit "thank you" email.

Can anyone point me to the correct AMPScript syntax for adding a subscriber's email address to one or multiple subscriber lists.

1 Answer 1

2

Here's a quick example:

%%[

SET @Subscriber=CreateObject("Subscriber")
SetObjectProperty(@sub,"SubscriberKey", "[SubscriberKey here]")
SetObjectProperty(@Subscriber,"EmailAddress",[EmailAddress here])
Set @List = CreateObject("SubscriberList")
SetObjectProperty(@List,"ID","[List ID here]")
SetObjectProperty(@List,"Status","Active")
AddObjectArrayItem(@Subscriber,"Lists", @List)
InvokeUpdate(@Subscriber,@status_msg,@Update_err)

]%%

If you're wanting to use the SSJS functions, see the List Server-Side JavaScript Functions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .