Difference between revisions of "BulkMail send"
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Email_and_SMS_Functions]] | [[Category:Email_and_SMS_Functions]] | ||
− | | + | {{HelpFiles}} |
− | ====BulkMail_send==== | + | ==== BulkMail_send ==== |
Send bulk mail | Send bulk mail | ||
Line 8: | Line 8: | ||
'''Syntax''' | '''Syntax''' | ||
− | BulkMail_send(bulkMailResourceId) | + | BulkMail_send(bulkMailResourceId[,''MaxToSend''[,schedule]]) |
'''Arguments''' | '''Arguments''' | ||
− | ''bulkMailResourceId:'' is a | + | ''bulkMailResourceId:'' Is a numeric (non-decimal) expression. It is the bulkmail Resource Id. |
+ | |||
+ | ''MaxToSend:'' Is a numeric (non-decimal) expression. It is the max email which send. | ||
+ | |||
+ | ''schedule:'' Use the given schedule to send the mails. It is CatTaskSchedule object see more at [[CatTaskInstantSchedule class|CatTaskInstantSchedule]], [[CatTaskSpecificTimeSchedule class|CatTaskSpecificTimeSchedule]], [[CatTaskNeverSchedule class|CatTaskNeverSchedule]] | ||
'''Return type''' | '''Return type''' | ||
− | + | Returns CatTask instance id of the sending | |
− | |||
− | |||
+ | '''Example with maxTosend''' | ||
+ | <source lang="javascript"> | ||
number bulkMailResourceId = 9399212; | number bulkMailResourceId = 9399212; | ||
BulkMail_send(bulkMailResourceId); | BulkMail_send(bulkMailResourceId); | ||
− | + | BulkMail_send(bulkMailResourceId, 20);// 20 is max email which will send | |
+ | |||
+ | </source> | ||
+ | |||
+ | '''Example with schedule bulkmail''' | ||
+ | <source lang="javascript"> | ||
+ | //schedule for send bulkmail at a specific time | ||
+ | number bulkmailRId = 15562486; | ||
+ | number maxToSend = 1; | ||
+ | DateTime dt = new DateTime("2017/05/31 03:10"); | ||
+ | CatTaskSpecificTimeSchedule schedule = new CatTaskSpecificTimeSchedule(dt); | ||
+ | BulkMail_send(bulkmailRId, maxToSend, schedule);//Returns CatTask instance id: 104701 (CatTaskMetaDataId: 54184) | ||
− | + | //schedule for send bulkmail now | |
+ | number bulkmailRId = 15562486; | ||
+ | number maxToSend = 1; | ||
+ | CatTaskInstantSchedule schedule = new CatTaskInstantSchedule(); | ||
+ | BulkMail_send(bulkmailRId, maxToSend, schedule);//Returns CatTask instance id: 104702 (CatTaskMetaDataId: 54185) | ||
− | + | //stop schedule of sending bulkmail | |
− | + | CatTaskScheduleHelper csHelper = new CatTaskScheduleHelper(); | |
− | < | + | number taskId = 104701; |
+ | CatTaskNeverSchedule schedule = new CatTaskNeverSchedule(); | ||
+ | csHelper.RescheduleByInstanceId(taskId, schedule); | ||
+ | </source> |
Latest revision as of 03:52, 9 July 2020
BulkMail_send
Send bulk mail
Syntax
BulkMail_send(bulkMailResourceId[,MaxToSend[,schedule]])
Arguments
bulkMailResourceId: Is a numeric (non-decimal) expression. It is the bulkmail Resource Id.
MaxToSend: Is a numeric (non-decimal) expression. It is the max email which send.
schedule: Use the given schedule to send the mails. It is CatTaskSchedule object see more at CatTaskInstantSchedule, CatTaskSpecificTimeSchedule, CatTaskNeverSchedule
Return type
Returns CatTask instance id of the sending
Example with maxTosend
number bulkMailResourceId = 9399212;
BulkMail_send(bulkMailResourceId);
BulkMail_send(bulkMailResourceId, 20);// 20 is max email which will send
Example with schedule bulkmail
//schedule for send bulkmail at a specific time
number bulkmailRId = 15562486;
number maxToSend = 1;
DateTime dt = new DateTime("2017/05/31 03:10");
CatTaskSpecificTimeSchedule schedule = new CatTaskSpecificTimeSchedule(dt);
BulkMail_send(bulkmailRId, maxToSend, schedule);//Returns CatTask instance id: 104701 (CatTaskMetaDataId: 54184)
//schedule for send bulkmail now
number bulkmailRId = 15562486;
number maxToSend = 1;
CatTaskInstantSchedule schedule = new CatTaskInstantSchedule();
BulkMail_send(bulkmailRId, maxToSend, schedule);//Returns CatTask instance id: 104702 (CatTaskMetaDataId: 54185)
//stop schedule of sending bulkmail
CatTaskScheduleHelper csHelper = new CatTaskScheduleHelper();
number taskId = 104701;
CatTaskNeverSchedule schedule = new CatTaskNeverSchedule();
csHelper.RescheduleByInstanceId(taskId, schedule);