6 function mailing_create_example(){
9 'body_text' => 'bdkfhdskfhduew',
11 'name' => 'mailing name',
15 $result = civicrm_api( 'mailing','create',$params );
21 * Function returns array of result expected from previous function
23 function mailing_create_expectedresult(){
25 $expectedResult = array(
34 'header_id' => 'null',
35 'footer_id' => 'null',
37 'unsubscribe_id' => '',
38 'resubscribe_id' => '',
40 'name' => 'mailing name',
41 'from_name' => 'FIXME',
42 'from_email' => 'info@EXAMPLE.ORG',
43 'replyto_email' => 'info@EXAMPLE.ORG',
45 'body_text' => 'bdkfhdskfhduew',
47 'url_tracking' => '1',
48 'forward_replies' => '',
49 'auto_responder' => 0,
50 'open_tracking' => '1',
52 'msg_template_id' => '',
53 'override_verp' => '1',
55 'created_date' => '20130204223402',
57 'scheduled_date' => '20130204223402',
59 'approval_date' => '20130204223402',
60 'approval_status_id' => '',
61 'approval_note' => '',
63 'visibility' => 'User and User Admin Only',
66 'sms_provider_id' => '',
67 'api.mailing_job.create' => array(
76 'scheduled_date' => '20130204223402',
79 'status' => 'Scheduled',
92 return $expectedResult ;
97 * This example has been generated from the API test suite. The test that created it is called
99 * testMailerCreateSuccess and can be found in
100 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/MailingTest.php
102 * You can see the outcome of the API tests at
103 * http://tests.dev.civicrm.org/trunk/results-api_v3
105 * To Learn about the API read
106 * http://book.civicrm.org/developer/current/techniques/api/
108 * and review the wiki at
109 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
111 * Read more about testing here
112 * http://wiki.civicrm.org/confluence/display/CRM/Testing
114 * API Standards documentation:
115 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards