• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP email_send函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中email_send函数的典型用法代码示例。如果您正苦于以下问题:PHP email_send函数的具体用法?PHP email_send怎么用?PHP email_send使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: generateHtmlEmail

/**
 * 
 *
 */
function generateHtmlEmail(&$smarty, $template_file, $mailCfg)
{
    // same objet that is returned by email_send
    $op = new stdClass();
    $op->status_ok = true;
    $op->msg = 'ok';
    $html_report = $smarty->fetch($template_file);
    if (!property_exists($mailCfg, 'from')) {
        $mailCfg->from = $_SESSION['currentUser']->emailAddress;
    }
    if (!property_exists($mailCfg, 'to')) {
        $mailCfg->to = $mailCfg->from;
    }
    if ($mailCfg->to == "") {
        $op->status_ok = false;
        $op->msg = lang_get("error_sendreport_no_email_credentials");
    } else {
        // TICKET 6905: Link to test case is still raw link (no title) in email(HTML) type of test report
        // array('strip_email_links' => false)
        $op = email_send($mailCfg->from, $mailCfg->to, $mailCfg->subject, $html_report, $mailCfg->cc, false, true, array('strip_email_links' => false));
        if ($op->status_ok) {
            $op->msg = sprintf(lang_get('mail_sent_to'), $mailCfg->to);
        }
    }
    return $op;
}
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:30,代码来源:displayMgr.php


示例2: sendErrorReport

function sendErrorReport()
{
    $options = getOptions();
    $extra_vars = isset($options['params']) ? $options['params'] : false;
    $content = parseEmail($options['email'], $extra_vars);
    email_send($options['mailTo'], "Une erreur s'est produite sur OpenNAS", $content, $outError);
    exit($outError);
}
开发者ID:BillTheBest,项目名称:OpenNAS,代码行数:8,代码来源:repl_alert.php


示例3: quick_mail

 public function quick_mail()
 {
     $RequestMethod = $this->input->server('REQUEST_METHOD');
     if ($RequestMethod == "POST") {
         $subject = $this->input->post('subject');
         $msg = $this->input->post('msg');
         email_send($this->input->post('emailto'), $subject, $msg);
         $this->session->set_flashdata('log_sucess', 'Email Successfully Send');
         redirect(site_url() . 'administrator/dashboard');
     }
 }
开发者ID:vishwakarma09,项目名称:bimpra.tk,代码行数:11,代码来源:Dashboard.php


示例4: send_transaction_mail

function send_transaction_mail($cust_email, $mer_email) {
    if (!empty($cust_email)) {
        $to[] = $cust_email;
    }
    if (!empty($mer_email)) {
        $to[] = $mer_email;
    }
    $sub = 'Payment Transaction';
    $msg = 'Payment Transaction Done Please check the Portal for Details';
    email_send($to, $sub, $msg, $cc = '', $bcc = '', $attach = '');
}
开发者ID:khushbu-soni,项目名称:server,代码行数:11,代码来源:general_helper.php


示例5: generateHtmlEmail

/**
 * 
 *
 */
function generateHtmlEmail(&$smarty, $template_file, $mailCfg)
{
    // same objet that is returned by email_send
    $op = new stdClass();
    $op->status_ok = true;
    $op->msg = 'ok';
    $html_report = $smarty->fetch($template_file);
    if (!property_exists($mailCfg, 'from')) {
        $mailCfg->from = $_SESSION['currentUser']->emailAddress;
    }
    if (!property_exists($mailCfg, 'to')) {
        $mailCfg->to = $mailCfg->from;
    }
    if ($mailCfg->to == "") {
        $op->status_ok = false;
        $op->msg = lang_get("error_sendreport_no_email_credentials");
    } else {
        $op = email_send($mailCfg->from, $mailCfg->to, $mailCfg->subject, $html_report, $mailCfg->cc, false, true);
        if ($op->status_ok) {
            $op->msg = sprintf(lang_get('mail_sent_to'), $mailCfg->to);
        }
    }
    return $op;
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:28,代码来源:displayMgr.php


示例6: set_get

//verify a users email
require '../includes/config/config.php';
//get variables
$email = set_get('e', '');
if (empty($email) || !email_is_valid($email)) {
    notices_set('Invalid email.', 'error');
    do_redirect();
}
//check if it is valid
$sql = sql_query(" SELECT id, confirm FROM `users` WHERE email='{$email}' LIMIT 1 ");
if (sql_count($sql) <= 0) {
    notices_set('Invalid email.', 'error');
    do_redirect();
}
//check if account already verified
$data = sql_fetch($sql);
if (!isset($data['confirm'])) {
    //account already confirmed
    notices_set('Email already confirmed.', 'success');
    do_redirect();
}
//create account confirm
$confirm = confirm_token_create($email);
//update account with new verify code
sql_query(" UPDATE `users` SET confirm='{$confirm}' WHERE id='{$data['id']}' LIMIT 1 ");
//send email
email_send('verify_resend', 'Planling Verification Code', array($email => $email), array('{{%LINK%}}' => 'http://' . MAIN_URL . '/verify?e=' . $email . '&t=' . $confirm));
//set message
notices_set('Confirmation code successfully sent!', 'success');
//redirect user
do_redirect();
开发者ID:dangledorf,项目名称:Planling,代码行数:31,代码来源:verify_resend.php


示例7: test_compose_email

function test_compose_email($project_id, $test_id, $recipients, $action)
{
    $display_generic_info = true;
    $display_generic_url = true;
    $generic_url = RTH_URL . "login.php?project_id={$project_id}&page=test_detail_page.php&test_id={$test_id}&project_id={$project_id}";
    $username = session_get_username();
    $project_name = session_get_project_name();
    $user_details = user_get_name_by_username($username);
    $first_name = $user_details[USER_FNAME];
    $last_name = $user_details[USER_LNAME];
    $test_detail = test_get_detail($test_id);
    $test_name = $test_detail[TEST_NAME];
    $status = $test_detail[TEST_STATUS];
    $priority = $test_detail[TEST_PRIORITY];
    $test_area = $test_detail[TEST_AREA_TESTED];
    $test_type = $test_detail[TEST_TESTTYPE];
    $ba_owner = $test_detail[TEST_BA_OWNER];
    $qa_owner = $test_detail[TEST_QA_OWNER];
    $assigned_to = $test_detail[TEST_ASSIGNED_TO];
    $comments = $test_detail[TEST_COMMENTS];
    # CREATE EMAIL SUBJECT AND MESSAGE
    switch ($action) {
        case "status_change":
            $subject = "RTH: {$test_name} - Test Status Change";
            $message = "The test status of {$test_name} has been updated by {$first_name} {$last_name}\r\n" . NEWLINE;
            break;
        case "steps_uploaded":
            $subject = "RTH: {$test_name} - Test Steps Added";
            $message = "Test Steps have been uploaded to {$test_name} by {$first_name} {$last_name}\r\n" . NEWLINE;
            break;
    }
    # Generic link to results page if the $generic_url variable has been set
    if ($display_generic_url) {
        $message .= "Click the following link to view the Test Results:" . NEWLINE;
        $message .= "{$generic_url}\n" . NEWLINE;
    }
    if ($display_generic_info) {
        $message .= "Project Name: {$project_name}\r" . NEWLINE;
        $message .= "Test Name: {$test_name}\r" . NEWLINE;
        $message .= "Status: {$status}\r" . NEWLINE;
        $message .= "Priority: {$priority}\r\n\r" . NEWLINE;
        $message .= "Test Area: {$test_name}\r" . NEWLINE;
        $message .= "Test Type: {$test_area}\r" . NEWLINE;
        $message .= "BA Owner: {$ba_owner}\r" . NEWLINE;
        $message .= "QA Owner: {$qa_owner}\r" . NEWLINE;
        $message .= "Assigned To: {$assigned_to}\r" . NEWLINE;
        $message .= "Comments: {$comments}\r\n\r" . NEWLINE;
    }
    email_send($recipients, $subject, $message);
}
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:50,代码来源:test_api.php


示例8: notifyGlobalAdmins

/**
 * send mail to administrators (users that have default role = administrator) 
 * to warn about new user created.
 *
 */
function notifyGlobalAdmins(&$dbHandler, &$userObj)
{
    // Get email addresses for all users that have default role = administrator
    $cfg = config_get('notifications');
    if (!is_null($cfg->userSignUp->to->roles)) {
        foreach ($cfg->userSignUp->to->roles as $roleID) {
            $roleMgr = new tlRole($roleID);
            $userSet = $roleMgr->getUsersWithGlobalRole($dbHandler);
            $key2loop = array_keys($userSet);
            foreach ($key2loop as $userID) {
                if (!isset($mail['to'][$userID])) {
                    $mail['to'][$userID] = $userSet[$userID]->emailAddress;
                }
            }
        }
    }
    if (!is_null($cfg->userSignUp->to->users)) {
        // Brute force query
        $tables = tlObject::getDBTables('users');
        $sql = " SELECT id,email FROM {$tables['users']} " . " WHERE login IN('" . implode("','", $cfg->userSignUp->to->users) . "')";
        $userSet = $dbHandler->fetchRowsIntoMap($sql, 'id');
        if (!is_null($userSet)) {
            foreach ($userSet as $userID => $elem) {
                if (!isset($mail['to'][$userID])) {
                    $mail['to'][$userID] = $elem['email'];
                }
            }
        }
    }
    $mail['to'] = implode(',', $mail['to']);
    // email_api uses ',' as list separator
    $mail['subject'] = lang_get('new_account');
    $mail['body'] = lang_get('new_account') . "\n";
    $mail['body'] .= " user:{$userObj->login}\n";
    $mail['body'] .= " first name:{$userObj->firstName} surname:{$userObj->lastName}\n";
    $mail['body'] .= " email:{$userObj->emailAddress}\n";
    // silence errors
    @email_send(config_get('from_email'), $mail['to'], $mail['subject'], $mail['body']);
}
开发者ID:JacekKarwas,项目名称:smutek,代码行数:44,代码来源:firstLogin.php


示例9: results_email

function results_email($project_id, $release_id, $build_id, $testset_id, $test_id, $recipients, $action)
{
    $display_generic_info = true;
    $display_generic_url = true;
    $generic_url = RTH_URL . "login.php?project_id={$project_id}&page=results_test_run_page.php&release_id={$release_id}&build_id={$build_id}&testset_id={$testset_id}&test_id={$test_id}";
    $username = session_get_username();
    $project_name = session_get_project_name();
    $release_name = admin_get_release_name($release_id);
    $build_name = admin_get_build_name($build_id);
    $testset_name = admin_get_testset_name($testset_id);
    $user_details = user_get_name_by_username($username);
    $first_name = $user_details[USER_FNAME];
    $last_name = $user_details[USER_LNAME];
    $row_test_detail = testset_query_test_details($testset_id, $test_id);
    $test_name = $row_test_detail[TEST_NAME];
    $status = $row_test_detail[TEST_TS_ASSOC_STATUS];
    $finished = $row_test_detail[TEST_TS_ASSOC_FINISHED];
    $assigned_to = $row_test_detail[TEST_TS_ASSOC_ASSIGNED_TO];
    $comments = $row_test_detail[TEST_TS_ASSOC_COMMENTS];
    $root_cause = $row_test_detail[TEST_RESULTS_ROOT_CAUSE];
    # CREATE EMAIL SUBJECT AND MESSAGE
    switch ($action) {
        case "test_run":
            $subject = "RTH: Test Run Notification - {$test_name}";
            $message = "Test {$test_name} has been run by {$first_name} {$last_name}\n" . NEWLINE;
            break;
        case "update_test_result":
            $subject = "RTH: Test Result has been Updated";
            $message = "The test result for {$test_name} has been updated by {$first_name} {$last_name}\n" . NEWLINE;
            break;
    }
    # Generic link to results page if the $generic_url variable has been set
    if ($display_generic_url) {
        $message .= "Click the following link to view the Test Results:" . NEWLINE;
        $message .= "{$generic_url}\n" . NEWLINE;
    }
    if ($display_generic_info) {
        $message .= "Project Name: {$project_name}\r" . NEWLINE;
        $message .= "Release Name: {$release_name}\r" . NEWLINE;
        $message .= "Build Name: {$build_name}\r" . NEWLINE;
        $message .= "TestSet Name: {$testset_name}\r\n\r" . NEWLINE;
        $message .= "Test Name: {$test_name}\r" . NEWLINE;
        $message .= "Status: {$status}\r" . NEWLINE;
        if (!empty($root_cause)) {
            $message .= "Root Cause: {$root_cause}\r" . NEWLINE;
        }
        $message .= "Comments: {$comments}\r\n\r" . NEWLINE;
    }
    email_send($recipients, $subject, $message);
}
开发者ID:nourchene-benslimane,项目名称:rth_backup,代码行数:50,代码来源:results_api.php


示例10: settings

	<td bgcolor="#f4f4f4">
		<span class="title">Testing Email</span>
		<p>You can test the ability for Mantis to send email notifications with this form.  Just click "Send Mail".  If the page takes a very long time to reappear or results in an error then you will need to investigate your php/mail server settings (see PHPMailer related settings in your config_inc.php, if they don't exist, copy from config_defaults_inc.php).  Note that errors can also appear in the server error log.  More help can be found at the <a href="http://www.php.net/manual/en/ref.mail.php">PHP website</a> if you are using the mail() PHPMailer sending mode.</p>
		<?php 
if ($f_mail_test) {
    echo '<b><font color="#ff0000">Testing Mail</font></b> - ';
    # @@@ thraxisp - workaround to ensure a language is set without authenticating
    #  will disappear when this is properly localized
    lang_push('english');
    $t_email_data = new EmailData();
    $t_email_data->email = config_get_global('administrator_email');
    $t_email_data->subject = 'Testing PHP mail() function';
    $t_email_data->body = 'Your PHP mail settings appear to be correctly set.';
    $t_email_data->metadata['priority'] = config_get('mail_priority');
    $t_email_data->metadata['charset'] = lang_get('charset', lang_get_current());
    $result = email_send($t_email_data);
    #$result = email_send( config_get_global( 'administrator_email' ), 'Testing PHP mail() function',	'Your PHP mail settings appear to be correctly set.');
    if (!$result) {
        echo ' PROBLEMS SENDING MAIL TO: ' . config_get_global('administrator_email') . '. Please check your php/mail server settings.<br />';
    } else {
        echo ' mail() send successful.<br />';
    }
}
?>
		<form method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
#email">
		Email Address: <?php 
echo config_get_global('administrator_email');
?>
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:check.php


示例11: mysqli_fetch_assoc

    // codigo correcto
    if (mysqli_num_rows($q_user) == 1) {
        $r_user = mysqli_fetch_assoc($q_user);
        $sql = "UPDATE usuarios SET password = '" . sha1($_POST['pass']) . "' WHERE recuperacion = '" . $_POST['codigo'] . "'";
        $q_pass = mysqli_query($link, $sql);
        //Cambio pass correcto
        if (mysqli_errno($link) == 0) {
            $sql = "UPDATE usuarios SET recuperacion = '0' WHERE recuperacion = '" . $_POST['codigo'] . "'";
            //mysqli_query($link, $sql);
            print "<div class='centrar'><div class='ok_ajustable'>Enhorabuena, tu contrase&ntilde;a nueva se a guardado, ya puedes acceder a <a href='login.php'>" . Sitio . "</a> con ella.<br>\n\t\t\t\t\t\t\t\tTambien te hemos mandado un email a tu direccion con la contrase&ntilde;a nueva</div></div>";
            $destinatario_email = $r_user['email'];
            $destinatario_name = $r_user['nombre'] . " " . $r_user['apellidos'];
            $titulo = "Contraseña nueva - " . Sitio;
            // No separar del borde
            $mensaje = "\n<html>\n<body style=\"background-color:#3869A0;text-align:center;padding:20px;\">\n<b style=\"color:white;font-size:40px;\">" . Sitio . "</b><br>\n<div style=\"background-color:white;border-radius:10px;display: inline-block;\nmargin: 10px;padding:20px;text-align:left;font-size:15px;\">\nHola " . $r_user['nombre'] . ", la contraseña nueva para tu cuenta es:<br><br>\n<b>" . $_POST['pass'] . "</b><br><br>\nYa puedes entrar con ella:<a href=\"http://" . Sitio_direccion . "/login.php\">\nhttp://" . Sitio_direccion . "/login.php</a><br>\n<center><i style=\"font-size:12px; color: grey;\">" . Sitio . " (c)</i></center>\n</div>\n</body></html>";
            $email_state = email_send($destinatario_name, $destinatario_email, $titulo, $mensaje);
            if ($email_state != TRUE) {
                print "<div class='centrar'><div class='error_ajustable'>Se ha producido un error al enviar el correo</div></div>";
            }
            die;
            // Cambio pass fail
        } else {
            print "<div class='centrar'><div class='error_ajustable'>Se ha producido un error al cambiar la contrase&ntilde;a</div></div>";
        }
    }
}
?>
		
		Si has perdido tu contrase&ntilde;a puedes generar otra introduciendo tu email a continuacion,<br>
		 la nueva contrase&ntilde;a se enviara a tu correo electronico.<br><br>
		<form method='POST' action='otros.php'>			
开发者ID:insidepython,项目名称:proyecto-red-social-,代码行数:31,代码来源:restore_pass.php


示例12: users_send_password_reset_code

function users_send_password_reset_code(&$user)
{
    $code = users_generate_password_reset_code($user);
    if (!$code) {
        return 0;
    }
    $GLOBALS['smarty']->assign('code', $code);
    email_send(array('to_email' => $user['email'], 'template' => 'email_password_reset.txt'));
    return 1;
}
开发者ID:jacques,项目名称:flamework,代码行数:10,代码来源:lib_users.php


示例13: sql_query

$sql = sql_query(" SELECT id FROM `users` WHERE email='{$email1}' LIMIT 1 ");
if (sql_count($sql) > 0) {
    notices_set('Email already in use, please use a different email or reset your password', 'error');
    $terror = true;
}
//last error check
if ($terror) {
    //exit script
    echo notices_get();
    return false;
}
//create password
$hash_token = password_hash_create();
//creates a users unique hash
$password = password_encrypt($password1, $hash_token);
//create account confirm
$confirm = confirm_token_create($email1);
//add to database
sql_query(" INSERT INTO `users` (hash_token, email, password, confirm) VALUES('{$hash_token}', '{$email1}', '{$password}', '{$confirm}') ");
//set notices
notices_set('Account successfully created!', 'success');
//send email
email_send('register', 'Welcome to Planling!', array($email1 => $email1), array('{{%LINK%}}' => 'http://' . MAIN_URL . '/verify?e=' . $email1 . '&t=' . $confirm));
//log the user in
if (do_login($email1, $password1)) {
    $main_data = set_main_data();
} else {
    return false;
}
//success
return true;
开发者ID:dangledorf,项目名称:Planling,代码行数:31,代码来源:register.php


示例14: emailLinkToExecPlanning

 /**
  *  Send link with filters to access (after login)
  *  to testCaseAssignedToMe feature
  * 
  */
 function emailLinkToExecPlanning($context, $targetUsers = null)
 {
     $debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;
     if (is_null($targetUsers)) {
         $sql = "/* {$debugMsg} */ " . " SELECT id FROM {$this->tables['users']} ";
         $targetUsers = $this->db->fetchColumnsIntoArray($sql, 'id');
     }
     $uSet = (array) $targetUsers;
     // if user has at least 1 assignment in context
     // send link
     $atd = $this->get_available_types();
     $tplan_id = intval($context['tplan_id']);
     $build_id = intval($context['build_id']);
     $sql = "/* {$debugMsg} */ " . " SELECT UA.user_id, U.email " . " FROM {$this->tables['user_assignments']} UA " . " JOIN {$this->tables['builds']} B " . " ON UA.build_id = B.id " . " LEFT JOIN {$this->tables['users']} U " . " ON U.id = UA.user_id " . " WHERE B.testplan_id = " . $tplan_id . " AND B.id = " . $build_id . " AND type = " . intval($atd['testcase_execution']['id']);
     $rs = $this->db->fetchRowsIntoMap($sql, 'user_id');
     $bye = true;
     if (!is_null($rs) && count($rs) > 0) {
         $bye = false;
         $sql = " SELECT NHTPRJ.name AS tproject, " . " NHTPL.name AS tplan " . " FROM {$this->tables['nodes_hierarchy']} NHTPRJ " . " JOIN {$this->tables['nodes_hierarchy']} NHTPL " . " ON NHTPRJ.id = NHTPL.parent_id " . " JOIN {$this->tables['node_types']} NT " . " ON NHTPRJ.node_type_id = NT.id " . " WHERE NT.description = 'testproject' " . " AND NHTPL.id = " . $tplan_id;
         $names = $this->db->get_recordset($sql);
         $names = $names[0];
         $body_flines = lang_get('testproject') . ': ' . $names['tproject'] . '<br />' . lang_get('testplan') . ': ' . $names['tplan'] . '<br /><br />';
     }
     if ($bye) {
         return;
         // >>>----> Bye,Bye!!!
     }
     $email = array();
     $email['from_address'] = config_get('from_email');
     $isoTS = date(DATE_RFC1123);
     $genby = lang_get('generated_by_TestLink_on') . ' ' . $isoTS;
     $ll = lang_get('mail_subject_link_to_assigned');
     $email['subject'] = sprintf($ll, $names['tplan'], $isoTS);
     $ln = $_SESSION['basehref'] . 'ltx.php?item=xta2m&tplan_id=' . $tplan_id . '&user_id=';
     $hint = lang_get('hint_you_need_to_be_logged');
     require_once 'email_api.php';
     foreach ($uSet as $user_id) {
         if (isset($rs[$user_id])) {
             $email['to_address'] = trim($rs[$user_id]['email']);
             if ($email['to_address'] != '') {
                 $email['body'] = $body_flines;
                 $email['body'] .= $hint . '<br><br>' . $ln . $user_id;
                 $email['body'] .= '<br><br>' . $genby;
                 $eop = email_send($email['from_address'], $email['to_address'], $email['subject'], $email['body'], '', true, true);
             }
         }
     }
 }
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:53,代码来源:assignment_mgr.class.php


示例15: resetPassword

/**
 * reset user password in DB
 * 
 * @param resource &$db reference to database handler
 * @param integer $userID 
 * @param string $newPasswordSendMethod, default 'send_password_by_mail'
 * 
 * @return hash
 *         status: integer result status code
 *         password: new password
 *         msg: error message (if any)  
 */
function resetPassword(&$db, $userID, $passwordSendMethod = 'send_password_by_mail')
{
    $retval = array('status' => tl::OK, 'password' => '', 'msg' => '');
    $user = new tlUser($userID);
    $retval['status'] = $user->readFromDB($db);
    // Reset can be done ONLY if user authentication method allows it.
    $doIt = false;
    if ($retval['status'] >= tl::OK) {
        $cfg = config_get('authentication');
        $cfg = $cfg['domain'];
        $doIt = isset($cfg[$user->authentication]) && $cfg[$user->authentication]['allowPasswordManagement'];
    }
    if ($doIt) {
        $retval['status'] = tlUser::E_EMAILLENGTH;
        if (trim($user->emailAddress) != "") {
            $newPassword = tlUser::generatePassword(8, 4);
            $retval['status'] = $user->setPassword($newPassword, $cfg[$user->authentication]);
            if ($retval['status'] >= tl::OK) {
                $retval['password'] = $newPassword;
                $mail_op = new stdClass();
                $mail_op->status_ok = false;
                if ($passwordSendMethod == 'send_password_by_mail') {
                    $msgBody = lang_get('your_password_is') . "\n\n" . $newPassword . "\n\n" . lang_get('contact_admin');
                    $mail_op = @email_send(config_get('from_email'), $user->emailAddress, lang_get('mail_passwd_subject'), $msgBody);
                }
                if ($mail_op->status_ok || $passwordSendMethod == 'display_on_screen') {
                    $retval['status'] = $user->writePasswordToDB($db);
                } else {
                    $retval['status'] = tl::ERROR;
                    $retval['msg'] = $mail_op->msg;
                }
            }
        }
    }
    $retval['msg'] = $retval['msg'] != "" ? $retval['msg'] : getUserErrorMessage($retval['status']);
    return $retval;
}
开发者ID:JacekKarwas,项目名称:smutek,代码行数:49,代码来源:users.inc.php


示例16: config_get

    if (defined('MANTIS_VERSION')) {
        $t_mantis_version = MANTIS_VERSION;
    } else {
        $t_mantis_version = config_get('mantis_version');
    }
    if (version_compare($t_mantis_version, '1.1.0a2', '>=')) {
        foreach ($t_email_ids as $t_email) {
            $t_recipient = trim($t_email);
            $t_subject = string_email(trim($t_subject));
            $t_message = string_email_links(trim($t_message));
            $t_email_data = new EmailData();
            $t_email_data->email = $t_recipient;
            $t_email_data->subject = $t_subject;
            $t_email_data->body = $t_message;
            $t_email_data->metadata = array();
            $t_email_data->metadata['headers'] = array('X-Mantis' => 'ReleaseMgt');
            $t_email_data->metadata['priority'] = config_get('mail_priority');
            $t_email_data->metadata['charset'] = 'utf-8';
            $t_email_data->metadata['plugins_htmlmail_html_message'] = base64_encode($t_html_message);
            email_queue_add($t_email_data);
        }
        if (OFF == config_get('email_send_using_cronjob')) {
            email_send_all();
        }
    } else {
        foreach ($t_email_ids as $t_email) {
            email_send($t_email, $t_subject, $t_message);
        }
    }
}
release_mgt_successful_redirect($t_redirect_url);
开发者ID:jhron,项目名称:mantis-releasemgt,代码行数:31,代码来源:upload.php


示例17: users_send_password_reset_code

function users_send_password_reset_code(&$user)
{
    $code = users_generate_password_reset_code($user);
    if (!$code) {
        return 0;
    }
    $GLOBALS['smarty']->assign('code', $code);
    $args = array('to_email' => $user['email'], 'template' => 'email_password_reset.txt');
    if (isset($GLOBALS['cfg']['password_retrieval_from_email'])) {
        $args['from_email'] = $GLOBALS['cfg']['password_retrieval_from_email'];
    }
    if (isset($GLOBALS['cfg']['password_retrieval_from_name'])) {
        $args['from_name'] = $GLOBALS['cfg']['password_retrieval_from_name'];
    }
    email_send($args);
    return 1;
}
开发者ID:netcon-source,项目名称:dotspotting,代码行数:17,代码来源:lib_users.php


示例18: gettext

        $input_errors[] = gettext("The old password is not correct.");
    }
    // Validate new password.
    if ($_POST['password_new'] !== $_POST['password_confirm']) {
        $input_errors[] = gettext("The confimed password does not match. Please ensure the passwords match exactly.");
    }
    if (empty($input_errors)) {
        $a_user[$cnid]['password'] = $_POST['password_new'];
        write_config();
        updatenotify_set("userdb_user", UPDATENOTIFY_MODE_MODIFIED, $a_user[$cnid]['uuid']);
        // Write syslog entry and send an email to the administrator
        $message = sprintf("The user %s has changed his password via user portal.", Session::getUserName());
        write_log($message);
        if (0 == @email_validate_settings()) {
            $subject = sprintf(gettext("Notification email from host: %s"), system_get_hostname());
            @email_send($config['system']['email']['from'], $subject, $message, $error);
        }
        $savemsg = gettext("The administrator has been notified to apply your changes.");
    }
}
include "fbegin.inc";
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabcont">
			<form action="<?php 
echo $_SERVER['SCRIPT_NAME'];
?>
" method="post" name="iform" id="iform">
				<?php 
if (!empty($input_errors)) {
开发者ID:rterbush,项目名称:nas4free,代码行数:31,代码来源:userportal_system_password.php


示例19: report_site

 function report_site()
 {
     $this->_secure(5);
     $result = '';
     $user = $this->session->all_userdata();
     $post_data = $_POST;
     if (!empty($post_data) && isset($post_data['site_id']) && isset($post_data['client_id']) && isset($post_data['report_reason'])) {
         $this->load->model('model_users');
         $this->load->model('model_sites');
         $site_id = $post_data['site_id'];
         $client_id = $post_data['client_id'];
         $report_reason = $post_data['report_reason'];
         $user_id = $user['user_id'];
         $site = $this->model_sites->get_records(array('client_id' => $client_id, 'site_id' => $site_id));
         $site_admins = $this->model_users->get_records(array('client_id' => $client_id, 'security_level_alias' => array('ADM', 'SUP')));
         if (!empty($site_admins)) {
             $email_from = empty($user['user_email']) ? get_app_var('FROM_EMAIL') : $user['user_email'];
             $email_subject = get_app_var('REPORT_ISSUE_SUBJECT') . ' ' . $site[0]['site_title'];
             $email_content_raw = get_app_var('REPORT_ISSUE');
             $email_content = replace_tokens($email_content_raw, array('site_name' => get_app_var('SITE_NAME'), 'login_page' => 'http://' . $_SERVER['SERVER_NAME'] . '/', 'site_title' => $site[0]['site_title'], 'report_user' => trim($user['user_first_name'] . ' ' . $user['user_last_name']), 'report_reason' => $report_reason));
             foreach ($site_admins as $site_admin) {
                 $email_to = $site_admin['user_email'];
                 email_send($email_from, $email_to, $email_subject, $email_content, true);
             }
         }
         $result = 'Thank you for reporting this issue. Your information has been sent to the dashboard administrator' . (sizeof($site_admins) > 1 ? 's' : '') . '.';
     }
     $data = array();
     $data['any'] = $result;
     $data['action_view'] = 'misc/any';
     $this->load->view('layouts/blank', $data);
 }
开发者ID:GordonTees,项目名称:masterdash,代码行数:32,代码来源:json.php


示例20: send_mail_to_testers

/**
 * send_mail_to_testers
 *
 *
 * @return void
 */
function send_mail_to_testers(&$dbHandler, &$tcaseMgr, &$guiObj, &$argsObj, $features, $operation)
{
    $testers['new'] = null;
    $mail_details['new'] = lang_get('mail_testcase_assigned') . "<br /><br />";
    $mail_subject['new'] = lang_get('mail_subject_testcase_assigned');
    $use_testers['new'] = true;
    $tcaseSet = null;
    $tcnames = null;
    $email = array();
    $userSet[] = $argsObj->userID;
    $userSet[] = $argsObj->testerID;
    $userData = tlUser::getByIDs($dbHandler, $userSet);
    $assigner = $userData[$argsObj->userID]->firstName . ' ' . $userData[$argsObj->userID]->lastName;
    $email['from_address'] = config_get('from_email');
    $body_first_lines = lang_get('testproject') . ': ' . $argsObj->tproject_name . '<br />' . lang_get('testplan') . ': ' . $guiObj->testPlanName . '<br /><br />';
    // Get testers id
    foreach ($features as $feature_id => $value) {
        if ($use_testers['new']) {
            $testers['new'][$value['user_id']][$value['tcase_id']] = $value['tcase_id'];
        }
        $tcaseSet[$value['tcase_id']] = $value['tcase_id'];
        $tcversionSet[$value['tcversion_id']] = $value['tcversion_id'];
    }
    $infoSet = $tcaseMgr->get_by_id_bulk($tcaseSet, $tcversionSet);
    foreach ($infoSet as $value) {
        $tcnames[$value['testcase_id']] = $guiObj->testCasePrefix . $value['tc_external_id'] . ' ' . $value['name'];
    }
    $path_info = $tcaseMgr->tree_manager->get_full_path_verbose($tcaseSet, array('output_format' => 'simple'));
    $flat_path = null;
    foreach ($path_info as $tcase_id => $pieces) {
        $flat_path[$tcase_id] = implode('/', $pieces) . '/' . $tcnames[$tcase_id];
    }
    foreach ($testers as $tester_type => $tester_set) {
        if (!is_null($tester_set)) {
            $email['subject'] = $mail_subject[$tester_type] . ' ' . $guiObj->testPlanName;
            foreach ($tester_set as $user_id => $value) {
                $userObj = $userData[$user_id];
                $email['to_address'] = $userObj->emailAddress;
                $email['body'] = $body_first_lines;
                $email['body'] .= sprintf($mail_details[$tester_type], $userObj->firstName . ' ' . $userObj->lastName, $assigner);
                foreach ($value as $tcase_id) {
                    $email['body'] .= $flat_path[$tcase_id] . '<br />';
                }
                $email['body'] .= '<br />' . date(DATE_RFC1123);
                $email_op = email_send($email['from_address'], $email['to_address'], $email['subject'], $email['body'], '', true, true);
            }
            // foreach($tester_set as $user_id => $value)
        }
    }
}
开发者ID:moraesmv,项目名称:testlink-code,代码行数:56,代码来源:planAddTC.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP email_send_all函数代码示例发布时间:2022-05-15
下一篇:
PHP email_relationship_added函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap