This repository has been archived by the owner on Jul 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Campaign.cfc
175 lines (172 loc) · 6.89 KB
/
Campaign.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
component displayame="Campaign" output="false" initmethod="init" accessors="true" {
property string campaignName;
property string campaignId;
property string campaignLink;
property string lastEditDate;
property string lastRunDate;
property string status;
property string updated;
property string sent;
property string opens;
property string clicks;
property string optOuts;
property string bounces;
property string forwards;
property string spamReports;
property string subject;
property string fromName;
property string fromEmail;
property string fromEmailId;
property string replyToEmail;
property string replyToEmailId;
property string campaignType;
property string viewAsWebpage;
property string viewAsWebpageLinkText;
property string viewAsWebpageText;
property string permissionReminder;
property string permissionReminderText;
property string greetingSalutation;
property string greetingName;
property string greetingString;
property string organizationName;
property string organizationAddress1;
property string organizationAddress2;
property string organizationAddress3;
property string organizationCity;
property string organizationState;
property string organizationInternationalState;
property string organizationPostalCode;
property string organizationCountry;
property string includeForwardEmail;
property string forwardEmailLinkText;
property string includeSubscribeLInk;
property string subscribeLinkText;
property string archiveStatus;
property string archiveUrl;
property string emailContentFormat;
property string emailContent;
property string emailTextContent;
property string styleSheet;
property array urls;
property array contactLists;
public Campaign function init(
required string campaignName,
string campaignId = 'http://api.constantcontact.com/ws/customers/#application.ccUsername#/campaigns',
string campaignLink = '',
string lastEditDate = '',
string lastRunDate = '',
string status = 'Draft',
string updated = '',
string sent = '',
string opens = '',
string clicks = '',
string optOuts = '',
string bounces = '',
string forwards = '',
string spamReports = '',
string subject = 'Default Subject Line',
string fromName = 'From Name',
string fromEmail = '[email protected]',
string fromEmailId = 'http://api.constantcontact.com/ws/customers/#application.ccUsername#/settings/emailaddresses/1',
string replyToEmail = '[email protected]',
string replyToEmailId = 'http://api.constantcontact.com/ws/customers/#application.ccUsername#/settings/emailaddresses/1',
string campaignType = 'CUSTOM',
string viewAsWebpage = 'NO',
string viewAsWebpageLinkText = '',
string viewAsWebpageText = '',
string permissionReminder = 'NO',
string permissionReminderText = 'Permission Reminder',
string greetingSalutation = 'Dear',
string greetingName = 'FirstName',
string greetingString = '',
string organizationName = '$ACCOUNT.ORGANIZATIONNAME',
string organizationAddress1 = '$ACCOUNT.ADDRESS_LINE_1',
string organizationAddress2 = '$ACCOUNT.ADDRESS_LINE_2',
string organizationAddress3 = '$ACCOUNT.ADDRESS_LINE_3',
string organizationState = '$ACCOUNT.US_STATE',
string organizationCity = '$ACCOUNT.CITY',
string organizationInternationalState = '$ACCOUNT.STATE',
string organizationPostalCode = '$ACCOUNT.POSTAL_CODE',
string organizationCountry = '$ACCOUNT.COUNTRY_CODE',
string includeForwardEmail = 'NO',
string forwardEmailLinkText = '',
string includeSubscribeLink = 'NO',
string subscribeLinkText = '',
string archiveStatus = '',
string archiveUrl = '',
string emailContentFormat = 'XHTML',
string emailTextContent = '<Text>This is the text version.</Text>',
string emailContent = '<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:cctd="http://www.constantcontact.com/cctd">
<body><CopyRight>Copyright (c) 1996-2009 Constant Contact. All rights reserved. Except as permitted under a
separate
written agreement with Constant Contact, neither the Constant Contact software, nor any content that appears on any
Constant Contact site,
including but not limited to, web pages, newsletters, or templates may be reproduced, republished, repurposed, or
distributed without the
prior written permission of Constant Contact. For inquiries regarding reproduction or distribution of any Constant
Contact material, please
contact [email protected].</CopyRight>
<OpenTracking/>
<!-- Do NOT delete previous line if you want to get statistics on the number of opened emails -->
<CustomBlock name="letter.intro" title="Personalization">
<Greeting/>
</CustomBlock>
</body>
</html>',
string styleSheet = '',
array urls = '#arrayNew(1)#',
array contactLists = '#arrayNew(1)#') {
setCampaignName(arguments.campaignName);
setCampaignLink(arguments.campaignLink);
setCampaignId(arguments.campaignId);
setLastEditDate(arguments.lastEditDate);
setUpdated(arguments.updated);
setLastRunDate(arguments.lastRunDate);
setStatus(arguments.status);
setSent(arguments.sent);
setOpens(arguments.opens);
setClicks(arguments.clicks);
setOptOuts(arguments.optOuts);
setBounces(arguments.bounces);
setSpamReports(arguments.spamReports);
setForwards(arguments.forwards);
setSubject(arguments.subject);
setFromName(arguments.fromName);
setFromEmail(arguments.fromEmail);
setFromEmailId(arguments.fromEmailId);
setReplyToEmail(arguments.replyToEmail);
setReplyToEmailId(arguments.replyToEmailId);
setCampaignType(arguments.campaignType);
setViewAsWebpage(arguments.viewAsWebpage);
setViewAsWebpageLinkText(arguments.viewAsWebpageLinkText);
setViewAsWebpageText(arguments.viewAsWebpageText);
setPermissionReminder(arguments.permissionReminder);
setPermissionReminderText(arguments.permissionReminderText);
setGreetingSalutation(arguments.greetingSalutation);
setGreetingName(arguments.greetingName);
setGreetingString(arguments.greetingString);
setOrganizationName(arguments.organizationName);
setOrganizationAddress1(arguments.organizationAddress1);
setOrganizationAddress2(arguments.organizationAddress2);
setOrganizationAddress3(arguments.organizationAddress3);
setOrganizationCity(arguments.organizationCity);
setOrganizationState(arguments.organizationState);
setOrganizationInternationalState(arguments.organizationInternationalState);
setOrganizationPostalCode(arguments.organizationPostalCode);
setOrganizationCountry(arguments.organizationCountry);
setIncludeForwardEmail(arguments.includeForwardEmail);
setForwardEmailLinkText(arguments.forwardEmailLinkText);
setIncludeSubscribeLink(arguments.includeSubscribeLink);
setSubscribeLinkText(arguments.subscribeLinkText);
setArchiveStatus(arguments.archiveStatus);
setArchiveUrl(arguments.archiveUrl);
setEmailContentFormat(arguments.emailContentFormat);
setEmailContent(arguments.emailContent);
setEmailTextContent(arguments.emailTextContent);
setStyleSheet(arguments.styleSheet);
setUrls(arguments.urls);
setContactLists(arguments.ContactLists);
return this;
}
}