当前位置: 首页>>代码示例>>PHP>>正文


PHP kJobsManager::addMailJob方法代码示例

本文整理汇总了PHP中kJobsManager::addMailJob方法的典型用法代码示例。如果您正苦于以下问题:PHP kJobsManager::addMailJob方法的具体用法?PHP kJobsManager::addMailJob怎么用?PHP kJobsManager::addMailJob使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kJobsManager的用法示例。


在下文中一共展示了kJobsManager::addMailJob方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendEmailAlert

 public function sendEmailAlert()
 {
     $this->kuser = kuserPeer::retrieveByPK($this->getKuserId());
     if ($this->kuser) {
         kJobsManager::addMailJob(null, 0, $this->kuser->getPartnerId(), $this->getAlertType(), kMailJobData::MAIL_PRIORITY_NORMAL, kconf::get("batch_notification_sender_email"), kconf::get("batch_notification_sender_name"), $this->kuser->getEmail(), $this->getBodyParamsArray(), $this->getSubjectParamsArray());
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:alert.php

示例2: execute

 public function execute()
 {
     $this->sent_request = false;
     if (isset($_POST['partner_id'])) {
         // do mail
         $mail_body = array();
         foreach ($_POST as $key => $val) {
             $mail_body[] = $key . ': ' . $val;
         }
         $strMailBody = implode('<BR><BR>', $mail_body);
         $body_params = array($strMailBody);
         $subject_params = array($_POST['subject']);
         kJobsManager::addMailJob(null, 0, $_POST['partner_id'], self::SUPPORT_EMAIL_TYPE_ID, kMailJobData::MAIL_PRIORITY_NORMAL, $_POST['email'], $_POST['your_name'] . ' ', 'support@kaltura.com', $body_params, $subject_params);
         $this->sent_request = true;
     }
     sfView::SUCCESS;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:17,代码来源:supportAction.class.php

示例3: execute

 public function execute()
 {
     // Prevent the page fron being embeded in an iframe
     header('X-Frame-Options: SAMEORIGIN');
     $this->sent_request = false;
     if (isset($_GET['style']) && $_GET['style'] == 'v') {
         // kmc virgo
         $this->closeFunction = 'parent.kmcCloseModal()';
         $this->bodyBgColor = 'E1E1E1';
     } else {
         $this->closeFunction = 'parent.kmc.utils.closeModal()';
         $this->bodyBgColor = 'F8F8F8';
     }
     if (isset($_POST['partner_id'])) {
         // do mail
         $mail_body = array();
         foreach ($_POST as $key => $val) {
             $mail_body[] = $key . ': ' . $val;
         }
         $strMailBody = implode('<BR><BR>', $mail_body);
         $body_params = array($strMailBody);
         $subject_params = array($_POST['subject']);
         kJobsManager::addMailJob(null, 0, $_POST['partner_id'], self::SUPPORT_EMAIL_TYPE_ID, kMailJobData::MAIL_PRIORITY_NORMAL, $_POST['email'], $_POST['your_name'] . ' ', 'kalturasupport@kaltura.com', $body_params, $subject_params);
         // Send support ticket to salesforce
         $post_items = array();
         foreach ($_POST as $key => $value) {
             $post_items[] = $key . '=' . $value;
         }
         $post_string = implode('&', $post_items);
         $ch = curl_init("https://www.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8");
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
         $this->curlResult = curl_exec($ch);
         curl_close($ch);
         $this->sent_request = true;
     }
     sfView::SUCCESS;
 }
开发者ID:DBezemer,项目名称:server,代码行数:38,代码来源:supportAction.class.php

示例4: sendNewUserMail

 public static function sendNewUserMail(kuser $user, $existingUser)
 {
     // setup parameters
     $partnerId = $user->getPartnerId();
     $userName = $user->getFullName();
     if (!$userName) {
         $userName = $user->getPuserId();
     }
     $creatorUserName = 'Unknown';
     if (!is_null(kCurrentContext::$ks_uid)) {
         $creatorUser = kuserPeer::getKuserByPartnerAndUid($partnerId, kCurrentContext::$ks_uid);
         if ($creatorUser) {
             $creatorUserName = $creatorUser->getFullName();
         }
     }
     $publisherName = PartnerPeer::retrieveByPK($partnerId)->getName();
     $loginEmail = $user->getEmail();
     $roleName = $user->getUserRoleNames();
     $puserId = $user->getPuserId();
     if (!$existingUser) {
         $resetPasswordLink = UserLoginDataPeer::getPassResetLink($user->getLoginData()->getPasswordHashKey());
     }
     $kmcLink = trim(kConf::get('apphome_url'), '/') . '/kmc';
     $adminConsoleLink = trim(kConf::get('admin_console_url'));
     $contactLink = kConf::get('contact_url');
     $beginnersGuideLink = kConf::get('beginners_tutorial_url');
     $quickStartGuideLink = kConf::get('quick_start_guide_url');
     // setup mail
     $mailType = null;
     $bodyParams = array();
     if ($partnerId == Partner::ADMIN_CONSOLE_PARTNER_ID) {
         if ($existingUser) {
             $mailType = self::KALTURA_NEW_EXISTING_USER_ADMIN_CONSOLE_EMAIL;
             $bodyParams = array($userName, $creatorUserName, $loginEmail, $roleName);
         } else {
             $mailType = self::KALTURA_NEW_USER_ADMIN_CONSOLE_EMAIL;
             $bodyParams = array($userName, $creatorUserName, $loginEmail, $resetPasswordLink, $roleName, $adminConsoleLink);
         }
     } else {
         if ($existingUser) {
             $mailType = self::KALTURA_NEW_EXISTING_USER_EMAIL;
             $bodyParams = array($userName, $creatorUserName, $publisherName, $loginEmail, $partnerId, $publisherName, $publisherName, $roleName, $publisherName, $puserId, $kmcLink, $contactLink, $beginnersGuideLink, $quickStartGuideLink);
         } else {
             $mailType = self::KALTURA_NEW_USER_EMAIL;
             $bodyParams = array($userName, $creatorUserName, $publisherName, $loginEmail, $resetPasswordLink, $partnerId, $publisherName, $publisherName, $roleName, $publisherName, $puserId, $kmcLink, $contactLink, $beginnersGuideLink, $quickStartGuideLink);
         }
     }
     // add mail job
     kJobsManager::addMailJob(null, 0, $partnerId, $mailType, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("partner_registration_confirmation_email"), kConf::get("partner_registration_confirmation_name"), $loginEmail, $bodyParams);
 }
开发者ID:DBezemer,项目名称:server,代码行数:50,代码来源:kuserPeer.php

示例5: emailChangedEmail

 public static function emailChangedEmail($partner_id, $partner_old_email, $partner_new_email, $partner_name, $mail_type)
 {
     kJobsManager::addMailJob(null, 0, $partner_id, $mail_type, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("partner_change_email_email"), kConf::get("partner_change_email_name"), $partner_old_email . ',' . $partner_new_email, array($partner_name, $partner_old_email, $partner_new_email));
 }
开发者ID:dozernz,项目名称:server,代码行数:4,代码来源:myPartnerUtils.class.php

示例6: myBatchFlattenServer

 public function myBatchFlattenServer($script_name)
 {
     $this->script_name = $script_name;
     $this->register($script_name);
     SET_CONTEXT("FS");
     $MAX_ITERATIONS_DUE_TO_PROPEL_MEMORY_LEAK = 10000000;
     self::initDb();
     list($sleep_between_cycles, $number_of_times_to_skip_writing_sleeping) = self::getSleepParams('app_flatten_');
     $last_worker_count = 0;
     $iteration = 0;
     $c = new Criteria();
     $currentDc = kDataCenterMgr::getCurrentDc();
     $c->add(BatchJobPeer::DC, kDataCenterMgr::getCurrentDcId());
     $c->add(BatchJobPeer::JOB_TYPE, BatchJobType::FLATTEN);
     $c->add(BatchJobPeer::STATUS, BatchJob::BATCHJOB_STATUS_PROCESSED);
     $temp_count = 0;
     while (1) {
         self::exitIfDone();
         try {
             sleep($sleep_between_cycles);
             $jobs = BatchJobPeer::doSelect($c);
             foreach ($jobs as $job) {
                 $data = json_decode($job->getData(true), true);
                 $entry_id = $data['entryId'];
                 $entry_int_id = $data['entryIntId'];
                 $entry_version = $data['entryVersion'];
                 $file_format = $data['fileFormat'];
                 $entry = entryPeer::retrieveByPK($entry_id);
                 if (!$entry) {
                     // entry is probably deleted if it is not returned from retrieveByPK
                     // close job as failed
                     $job->setStatus(BatchJob::BATCHJOB_STATUS_FAILED);
                     $job->setDescription("could not retrieve entry, probably deleted");
                     TRACE("could not retrieve entry {$entry_id} , probably deleted");
                     $job->save();
                     continue;
                 }
                 $fileSyncKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DOWNLOAD, $file_format);
                 $fullFinalPath = kFileSyncUtils::getLocalFilePathForKey($fileSyncKey);
                 $finalPathNoExt = substr($fullFinalPath, 0, strlen($fullFinalPath) - strlen($file_format));
                 myContentStorage::fullMkdir($fullFinalPath);
                 $wildcardFinalPath = $finalPathNoExt . "*";
                 $older_files = glob($wildcardFinalPath);
                 foreach ($older_files as $older_file) {
                     TRACE("removing old file: [{$older_file}]");
                     @unlink($older_file);
                 }
                 TRACE("Downloading: {$fullFinalPath}");
                 kFile::downloadUrlToFile($data["serverUrl"], $fullFinalPath);
                 if (!file_exists($fullFinalPath)) {
                     TRACE("file doesnt exist: " . $data["serverUrl"]);
                     $job->setDescription("file doesnt exist: " . $data["serverUrl"]);
                     $job->setStatus(BatchJob::BATCHJOB_STATUS_FAILED);
                 } else {
                     if (filesize($fullFinalPath) < 100000) {
                         @unlink($fullFinalPath);
                         TRACE("file too small: " . $data["serverUrl"]);
                         $job->setDescription("file too small: " . $data["serverUrl"]);
                         $job->setStatus(BatchJob::BATCHJOB_STATUS_FAILED);
                     } else {
                         if ($data['email']) {
                             $downloadLink = $entry->getDownloadUrl() . '/format/' . $file_format;
                             kJobsManager::addMailJob(null, $entry_id, $entry->getPartnerId(), self::KALTURAS_FLATTEN_READY, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("batch_flatten_video_sender_email"), kConf::get("batch_flatten_video_sender_name"), $data['email'], array($data['email'], $downloadLink));
                         }
                         TRACE("Deleting: " . $data["deleteUrl"]);
                         kFile::downloadUrlToString($data["deleteUrl"]);
                         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE, $entry);
                         $job->setStatus(BatchJob::BATCHJOB_STATUS_FINISHED);
                         $filePath = kFileSyncUtils::getLocalFilePathForKey($fileSyncKey);
                         if (file_exists($filePath)) {
                             try {
                                 kFileSyncUtils::createSyncFileForKey($fileSyncKey);
                             } catch (Exception $ex) {
                                 TRACE("ignore ERROR: " . $ex->getMessage());
                             }
                         } else {
                             TRACE("The file [{$filePath}] doesn't exists, not creating FileSync");
                         }
                     }
                 }
                 $job->save();
             }
         } catch (Exception $ex) {
             TRACE("ERROR: " . $ex->getMessage());
             self::initDb(true);
             self::failed();
         }
         if ($temp_count == 0) {
             TRACE("Ended conversion. sleeping for a while (" . $sleep_between_cycles . " seconds). Will write to the log in (" . $sleep_between_cycles * $number_of_times_to_skip_writing_sleeping . ") seconds");
         }
         $temp_count++;
         if ($temp_count >= $number_of_times_to_skip_writing_sleeping) {
             $temp_count = 0;
         }
     }
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:96,代码来源:myBatchFlattenVideo.class.php

示例7: emailResetPassword

 private function emailResetPassword($partner_id, $cms_email, $admin_name, $resetPasswordLink)
 {
     kJobsManager::addMailJob(null, 0, $partner_id, adminKuserPeer::KALTURAS_CMS_PASSWORD_RESET, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("partner_change_email_email"), kConf::get("partner_change_email_name"), $cms_email, array($admin_name, $resetPasswordLink));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:4,代码来源:adminKuserPeer.php

示例8: handleLiveReportExportAborted

 public static function handleLiveReportExportAborted(BatchJob $dbBatchJob, kLiveReportExportJobData $data)
 {
     $time = date("m-d-y H:i", $data->timeReference + $data->timeZoneOffset);
     $email_id = MailType::MAIL_TYPE_LIVE_REPORT_EXPORT_ABORT;
     $params = array($dbBatchJob->getPartner()->getName(), $time, $dbBatchJob->getId());
     $titleParams = array($time);
     kJobsManager::addMailJob(null, 0, $dbBatchJob->getPartnerId(), $email_id, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("live_report_sender_email"), kConf::get("live_report_sender_name"), $data->recipientEmail, $params, $titleParams);
     return $dbBatchJob;
 }
开发者ID:GElkayam,项目名称:server,代码行数:9,代码来源:kFlowHelper.php

示例9: sendRegistrationInformation

 private function sendRegistrationInformation(Partner $partner, kuser $adminKuser, $existingUser, $recipient_email = null, $partner_type = 1)
 {
     $mailType = null;
     $bodyParams = array();
     $partnerId = $partner->getId();
     $userName = $adminKuser->getFullName();
     if (!$userName) {
         $userName = $adminKuser->getPuserId();
     }
     $loginEmail = $adminKuser->getEmail();
     $loginData = $adminKuser->getLoginData();
     $hashKey = $loginData->getNewHashKeyIfCurrentInvalid();
     $resetPasswordLink = UserLoginDataPeer::getPassResetLink($hashKey);
     $kmcLink = trim(kConf::get('apphome_url'), '/') . '/kmc';
     $contactLink = kConf::get('contact_url');
     $contactPhone = kConf::get('contact_phone_number');
     $beginnersGuideLink = kConf::get('beginners_tutorial_url');
     $quickStartGuideLink = kConf::get('quick_start_guide_url');
     if ($recipient_email == null) {
         $recipient_email = $loginEmail;
     }
     // send the $cms_email,$cms_password, TWICE !
     if (kConf::get('kaltura_installation_type') == 'CE') {
         $partner_type = 1;
     }
     switch ($partner_type) {
         // send different email for different partner types
         case 1:
             // KMC signup
             if ($existingUser) {
                 $mailType = self::KALTURAS_EXISTING_USER_REGISTRATION_CONFIRMATION;
                 $bodyParams = array($userName, $loginEmail, $partnerId, $contactLink, $contactPhone, $beginnersGuideLink, $quickStartGuideLink);
             } else {
                 $mailType = self::KALTURAS_CMS_REGISTRATION_CONFIRMATION;
                 $bodyParams = array($userName, $loginEmail, $partnerId, $resetPasswordLink, $kmcLink, $contactLink, $contactPhone, $beginnersGuideLink, $quickStartGuideLink);
             }
             break;
         default:
             // all others
             if ($existingUser) {
                 $mailType = self::KALTURAS_DEFAULT_EXISTING_USER_REGISTRATION_CONFIRMATION;
                 $bodyParams = array($userName, $loginEmail, $partnerId, $contactLink, $contactPhone, $beginnersGuideLink, $quickStartGuideLink);
             } else {
                 $mailType = self::KALTURAS_DEFAULT_REGISTRATION_CONFIRMATION;
                 $bodyParams = array($userName, $loginEmail, $partnerId, $resetPasswordLink, $kmcLink, $contactLink, $contactPhone, $beginnersGuideLink, $quickStartGuideLink);
             }
             break;
     }
     kJobsManager::addMailJob(null, 0, $partnerId, $mailType, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("partner_registration_confirmation_email"), kConf::get("partner_registration_confirmation_name"), $recipient_email, $bodyParams);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:50,代码来源:myPartnerRegistration.class.php

示例10: sendBulkUploadNotificationEmail

 public static function sendBulkUploadNotificationEmail(BatchJob $dbBatchJob, $email_id, $params)
 {
     kJobsManager::addMailJob(null, 0, $dbBatchJob->getPartnerId(), $email_id, kMailJobData::MAIL_PRIORITY_NORMAL, kConf::get("batch_alert_email"), kConf::get("batch_alert_name"), $dbBatchJob->getPartner()->getBulkUploadNotificationsEmail(), $params);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:4,代码来源:kFlowHelper.php


注:本文中的kJobsManager::addMailJob方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。