SetLanguage('en', 'langs/'); $mail->CharSet = $TLN->ucharset; $mail->Hostname = $TLN->getServerName();; $mail->Host = $TLN->config['smtp_server']; $mail->WordWrap = 76; $mail->Priority = 3; $mail->SMTPDebug = false; $mail->Mailer = $TLN->config['mailer_type']; if ($TLN->config['phpmailer_sendmail'] != "") { $mail->Sendmail = $TLN->config['phpmailer_sendmail']; } if ($TLN->config['phpmailer_timeout'] != 0) { $mail->Timeout = $TLN->config['phpmailer_timeout']; } // for password authenticated servers $mail->SMTPAuth = $TLN->config['use_password_for_smtp']; $mail->Username = $auth['user']; $mail->Password = $auth['pass']; // build the email $mail->From = ($TLN->config['allow_modified_from'] && !empty($TLN->prefs['reply-to'])) ? $TLN->prefs['reply-to'] : $auth['email']; $mail->FromName = $mail->encodeHeader($TLN->prefs['real-name']); $mail->AddReplyTo($TLN->prefs['reply-to'], $mail->encodeHeader($TLN->prefs['real-name'])); $mail->AddAddress($recipient); $mail->Subject = $mail->encodeHeader(stripslashes($receiptSubj)); $mail->Body = stripslashes($receiptText); // send if ($mail->Send() === true) { echo 'success: receipt sent'; } else { echo 'error: '.$mail->ErrorInfo; } break; // just refresh the session timeout case 'pingSession': // refresh time $auth['start'] = time(); // save $AuthSession->Save($auth); break; // Regen the calendar case 'replaceCal': $newcal = new MyMonth($TLN->userdatafolder, $TLN->dirperm, ($_POST['cal_year']), intval($_POST['cal_month'])); $newcal->showMonthAsTable(); break; default: echo 'error: this action does not exist'; } } else { // no action, no fun echo 'error: no action specified'; }