i want to load the email recipientList from our newsletter server wit ADO from a MSSQL database. At first i am trying how to set the email list programmaticly but the list is ignored by the action.
i have made the following:
Sub BeforeAction(Action, SkipAction) Action.RecipientsList.Add "info",info@oneDomain.dcom, true Action.RecipientsList.Add "support","support@AnotherDomain.com", true
Hi,after restart all was working.So this track can be closed.I have also enhanced this part with direct access to a microosft sql server with ado recordset. For all who are interested here the code, which uses integrated securitry. Servername, Instancename (if yu have one, otherwise leave also the backslash) etc, must be changed with real names: Sub BeforeAction(Action, SkipAction) dim con, rs Set con = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") con.open _ "Provider=SQLOLEDB;Data Source=ServerName\InstanceName;" & _ "Trusted_Connection=Yes;Initial Catalog=MyDatabase;" rs.open "SELECT Fullname, Email FROM MyAddressTable", con do while not rs.eof Action.RecipientsList.Add CStr(rs.fields("Fullname")),CStr(rs.fields("Email")), true rs.movenext loop set con = nothing set rs = nothing End Sub