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


PHP Employee::getEmailAddress方法代码示例

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


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

示例1: Employee

 $employee = new Employee($_POST['employee']);
 $employer = new Employer($_POST['employer']);
 $lines = file(dirname(__FILE__) . '/../private/mail/employee_job_assignment.txt');
 $message = '';
 foreach ($lines as $line) {
     $message .= $line;
 }
 $message = str_replace('%job_id%', $job->getId(), $message);
 $message = str_replace('%job%', $_POST['title'], $message);
 $message = str_replace('%employer%', $employer->getName(), $message);
 $message = str_replace('%country%', Country::getCountryFrom($_POST['country']), $message);
 $message = str_replace('%is_exec%', $_POST['is_executive'] == '1' ? 'Yes' : 'No', $message);
 $message = str_replace('%expiry%', $job->getExpiryDate(), $message);
 $subject = $_POST['title'] . ' position has been assigned to you';
 $headers = 'From: YellowElevator.com <admin@yellowelevator.com>' . "\n";
 mail($employee->getEmailAddress(), $subject, $body, $headers);
 // $handle = fopen('/tmp/email_to_'. $employee->getEmailAddress(). '.txt', 'w');
 // fwrite($handle, 'Subject: '. $subject. "\n\n");
 // fwrite($handle, $body);
 // fclose($handle);
 // Tweet about this job, if it is new
 if ($new_id > 0 && !$is_test_site) {
     $employer = htmlspecialchars_decode(stripslashes($employer->getName()));
     $url = $GLOBALS['protocol'] . '://' . $GLOBALS['root'] . '/job/' . $new_id;
     $status = $data['title'] . ' (' . $employer . ') - ' . $url;
     $twitter_username = 'yellowelevator';
     $twitter_password = 'yellow123456';
     $tweetUrl = 'http://www.twitter.com/statuses/update.xml';
     $curl = curl_init();
     curl_setopt($curl, CURLOPT_URL, $tweetUrl);
     curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:employer_action.php

示例2: explode

 $result = $member_resume->find($criteria);
 $original_filename = explode('.', $result[0]['file_name']);
 $extension = $original_filename[1];
 $resume_file_raw = $resume . '.' . $result[0]['file_hash'];
 $attached_filename = $resume . '.' . $extension;
 $filetype = $result[0]['file_type'];
 $attachment = chunk_split(base64_encode(file_get_contents($GLOBALS['resume_dir'] . '/' . $resume_file_raw)));
 // 3. make mail with attachment
 $subject = '';
 if ($has_many_jobs) {
     $subject = 'Multiple Jobs Applications - Resume #' . $_POST['resume'];
 } else {
     $subject = trim(substr($job_list, 2)) . ' - Resume #' . $_POST['resume'];
 }
 //$headers = 'From: YellowElevator.com <admin@yellowelevator.com>' . "\n";
 $headers = 'From: ' . $employee->getEmailAddress() . "\n";
 $headers .= 'Cc: ' . $yel_email . "\n";
 $headers .= 'MIME-Version: 1.0' . "\n";
 $headers .= 'Content-Type: multipart/mixed; boundary="yel_mail_sep_' . $attached_filename . '";' . "\n\n";
 $body = '--yel_mail_sep_' . $attached_filename . "\n";
 $body .= 'Content-Type: multipart/alternative; boundary="yel_mail_sep_alt_' . $attached_filename . '"' . "\n";
 $body .= '--yel_mail_sep_alt_' . $attached_filename . "\n";
 $body .= 'Content-Type: text/plain; charset="iso-8859-1"' . "\n";
 $body .= 'Content-Transfer-Encoding: 7bit"' . "\n";
 $body .= $message . "\n";
 $body .= '--yel_mail_sep_alt_' . $attached_filename . "--\n\n";
 $body .= '--yel_mail_sep_' . $attached_filename . "\n";
 $body .= 'Content-Type: ' . $filetype . '; name="' . $attached_filename . '"' . "\n";
 $body .= 'Content-Transfer-Encoding: base64' . "\n";
 $body .= 'Content-Disposition: attachment' . "\n";
 $body .= $attachment . "\n";
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:member_action.php

示例3: Employer

    $result = $referral->find($criteria);
    $employer = new Employer($result[0]['employer']);
    $branch = $employer->getAssociatedBranch();
    $response = array('title' => $result[0]['title'], 'employer' => $result[0]['employer'], 'referee' => $result[0]['referee'], 'currency' => Currency::getSymbolFromCountryCode($branch[0]['country']));
    header('Content-type: text/xml');
    echo $xml_dom->get_xml_from_array(array('referral' => $response));
    exit;
}
if ($_POST['action'] == 'confirm_employed') {
    $work_commence_on = $_POST['work_commence_on'];
    $is_replacement = false;
    $is_free_replacement = false;
    $previous_referral = '0';
    $previous_invoice = '0';
    $employee = new Employee($_POST['employee_id']);
    $employee_email = $employee->getEmailAddress();
    if (is_null($employee_email) || empty($employee_email) || $employee_email === false) {
        $employee_email = '';
    }
    // 1. Update the referral to employed
    $referral = new Referral($_POST['id']);
    $criteria = array('columns' => "jobs.id AS job_id, jobs.title, jobs.employer, \n                      referrals.member, referrals.referee", 'joins' => "jobs ON jobs.id = referrals.job", 'match' => "referrals.id = " . $_POST['id'], 'limit' => "1");
    $result = $referral->find($criteria);
    $employer = new Employer($result[0]['employer']);
    $candidate = new Member($result[0]['referee']);
    $member = new Member($result[0]['member']);
    $job = array('id' => $result[0]['job_id'], 'title' => htmlspecialchars_decode(stripslashes($result[0]['title'])));
    $salary = $_POST['salary'];
    $irc_id = $member->isIRC() ? $member->getId() : NULL;
    $total_reward = $referral->calculateRewardFrom($salary, $irc_id);
    $total_token_reward = $total_reward * 0.3;
开发者ID:pamalite,项目名称:yel,代码行数:31,代码来源:members_action.php


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