function testEmail() { $email = new mail(); if ($email->send($_POST['email'], '测试用户', '这是一封测试邮件!', '这是一封测试邮件!你看到此邮件,说明你的邮箱已经配置好了。欢迎来到' . '<a href="' . __WEB__ . '">' . C('WEB_NAME') . '</a><br /><a href="http://www.houdunwang.com"><img src="http://bbs.houdunwang.com/static/image/common/logo.png" alt="后盾PHP培训" /></a>')) { $this->success('邮件发送成功'); } $this->success('邮件发送失败'); }
public static function compra($data) { // dd($data); mail::send('correos.compra', $data, function ($messages) use($data) { $messages->from(env('MAIL_USERNAME'), env('MAIL_NAME')); $messages->subject(' 🏆 ¡Felicitaciones! Gracias por su Compra ...'); $messages->to($data["correo"]); }); }
function send() { /* send mail */ mail::from('*****@*****.**'); mail::html(urldecode(params::get('u_name')) . ':' . urldecode(params::get('u_email')) . ': ' . urldecode(params::get('u_text'))); mail::subject('Сайтик шлет письмо'); mail::send('*****@*****.**'); }
function sendFeedback() { $mail_content = params::get('message'); $email = params::get('email'); if (!empty($mail_content) && !empty($email)) { mail::from($email); mail::html($mail_content); mail::subject(settings::get('feedback', 'feedback_subject')); mail::send(settings::get('feedback', 'feedback_email')); headers::url('/contacts/success/'); } }
public function index(MailRequest $request) { $contactName = $request->input('name'); $contactEmail = $request->input('email'); $contactNumber = $request->input('contact_number'); $contactMessage = $request->input('message'); $data = ['name' => $contactName, 'email' => $contactEmail, 'number' => $contactNumber, 'bodyMessage' => $contactMessage]; mail::send('articles.enquiry', $data, function ($message) { $message->to('*****@*****.**', 'Adam Johnson')->subject('Website Enquiry'); $message->from('*****@*****.**', 'AJDigital'); }); return redirect('/')->with(['flash_message' => 'Your message has been sent', 'flash_message_important' => false]); }
/** * Prueft die URL damit keine boesen URLS uebergeben werden koennen * @param $param */ function validURLCheck($param) { if (strstr($param, '://')) { // Der APP_ROOT muss in der URL vorkommen, sonfern es kein relativer Pfad ist // HTTPS und HTTP if (mb_strpos($param, APP_ROOT) !== 0 && mb_strpos(mb_str_replace("http://", "https://", $param), APP_ROOT) !== 0 && mb_strpos(mb_str_replace("https://", "http://", $param), APP_ROOT) !== 0) { $text = "Dies ist eine automatische Mail.\nEs wurde eine mögliche XSS Attacke durchgefuehrt:\n"; $text .= "\nFolgende URL wurde versucht aufzurufen: \n" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $text .= "\n\nIP des Aufrufers: " . $_SERVER['REMOTE_ADDR']; $text .= "\n\nUserAgent: " . $_SERVER['HTTP_USER_AGENT']; $text .= "\n\nAuffälliger Value: {$param}"; $mail = new mail(MAIL_ADMIN, 'no-reply@' . DOMAIN, 'Versuchte XSS Attacke', $text); $mail->send(); die('Invalid URL detected'); } } }
function email_reply() { //验证权限,跳转提示页面 if (!in_array(parent::reply_access, $this->admin_access)) { http::skip('login/forbid'); } $tip_info = array('error' => 1, 'info' => 'send email failed'); if (post('email', 'isset')) { //接收数据 $email = post('email', 'post'); $title = post('title', 'title'); $content = post('content', 'info'); //发送邮件 mail::send($email, $title, $content); $tip_info = array('error' => 0, 'info' => 'email sent'); } http::json($tip_info); }
function sendMailInternational() { $emailtext = "Dies ist eine automatisch generierte E-Mail.<br><br>"; $emailtext .= "Es hat sich ein neuer Outgoing am System registriert.</b>"; $mail = new mail(MAIL_INTERNATIONAL_OUTGOING, 'no-reply', 'New Outgoing', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.'); $mail->setHTMLContent($emailtext); $mail->send(); }
function sendEMail($nFromUserId, $sSubject, $sText, $bSendEMailAddress) { global $opt, $translate; if ($this->exist() == false) { return false; } if ($this->getIsActive() == false) { return false; } if ($this->getEMail() === null || $this->getEMail() == '') { return false; } if ($sSubject == '') { return false; } if ($sText == '') { return false; } if (mb_strpos($sSubject, "\n") !== false) { $sSubject = mb_substr($sSubject, 0, mb_strpos($sSubject, "\n")); } $sSubject = mb_trim($sSubject); $fromUser = new user($nFromUserId); if ($fromUser->exist() == false) { return false; } if ($fromUser->getIsActive() == false) { return false; } if ($fromUser->getEMail() === null || $fromUser->getEMail() == '') { return false; } $language = $this->getLanguageCode(); if (!$language) { $language = $opt['template']['locale']; } // ok, we can send ... $mail = new mail(); $mail->name = 'usercontactmail'; $mail->to = $this->getEMail(); $mail->recipient_locale = $this->getLanguageCode(); $mail->from = $opt['mail']['usermail']; if ($bSendEMailAddress == true) { $mail->replyTo = $fromUser->getEMail(); $mail->returnPath = $fromUser->getEMail(); } $mail->subject = $translate->t('E-Mail from', '', basename(__FILE__), __LINE__, '', 1, $language) . ' ' . $fromUser->getUsername() . ': ' . $sSubject; $mail->assign('usersubject', $sSubject); $mail->assign('text', $sText); $mail->assign('username', $this->getUsername()); $mail->assign('sendemailaddress', $bSendEMailAddress); $mail->assign('fromusername', $fromUser->getUsername()); $mail->assign('fromuserid', $fromUser->getUserId()); $mail->assign('fromuseremail', $fromUser->getEMail()); if ($mail->send()) { // send copy to fromUser $mail->assign('copy', true); $mail->to = $fromUser->getEMail(); $mail->send(); // log sql("INSERT INTO `email_user` (`ipaddress`, \n\t\t\t `from_user_id`, \n\t\t\t `from_email`, \n\t\t\t `to_user_id`, \n\t\t\t `to_email`)\n\t\t\t VALUES ('&1', '&2', '&3', '&4', '&5')", $_SERVER["REMOTE_ADDR"], $fromUser->getUserId(), $fromUser->getEMail(), $this->getUserId(), $this->getEMail()); return true; } else { return false; } }
function sendMail($zugangscode, $email) { global $p, $vorname, $nachname; $mail = new mail($email, 'no-reply', $p->t('bewerbung/registration'), $p->t('bewerbung/mailtextHtml')); $text = $p->t('bewerbung/mailtext', array($vorname, $nachname, $zugangscode)); $mail->setHTMLContent($text); if (!$mail->send()) { $msg = '<span class="error">' . $p->t('bewerbung/fehlerBeimSenden') . '</span><br /><a href=' . $_SERVER['PHP_SELF'] . '?method=registration>' . $p->t('bewerbung/zurueckZurAnmeldung') . '</a>'; } else { $msg = $p->t('global/emailgesendetan') . " {$email}!<br><a href=" . $_SERVER['PHP_SELF'] . ">" . $p->t('bewerbung/zurueckZurAnmeldung') . "</a>"; } // sende Nachricht an Assistenz return $msg; }
function sql_warn($warnmessage) { global $opt; if ($opt['db']['error']['mail'] != '') { if (admin_errormail($opt['db']['error']['mail'], $opt['db']['warn']['subject'], $warnmessage . "\n" . print_r(debug_backtrace(), true), "From: " . $opt['mail']['from'])) { require_once $opt['rootpath'] . 'lib2/mail.class.php'; $mail = new mail(); $mail->name = 'sql_warn'; $mail->subject = $opt['db']['warn']['subject']; $mail->to = $opt['db']['warn']['mail']; $mail->assign('warnmessage', $warnmessage); $mail->assign('trace', print_r(debug_backtrace(), true)); $mail->send(); $mail = null; } } }
function sendBewerbung($prestudent_id) { global $person_id; $person = new person(); $person->load($person_id); $prestudent = new prestudent(); if (!$prestudent->load($prestudent_id)) { die('Konnte Prestudent nicht laden'); } $studiengang = new studiengang(); if (!$studiengang->load($prestudent->studiengang_kz)) { die('Konnte Studiengang nicht laden'); } $email = 'Es hat sich ein Student für Ihren Studiengang beworben. <br>'; $email .= 'Name: ' . $person->vorname . ' ' . $person->nachname . '<br>'; $email .= 'Studiengang: ' . $studiengang->bezeichnung . '<br><br>'; $email .= 'Für mehr Details, verwenden Sie die Personenansicht im FAS.'; $mail = new mail($studiengang->email, 'no-reply', 'Bewerbung ' . $person->vorname . ' ' . $person->nachname, 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.'); $mail->setHTMLContent($email); if (!$mail->send()) { return false; } else { return true; } }
$sTopic = sql_value("SELECT `name` FROM `news_topics` WHERE `id`='&1'", '', $topicid); $tpl->assign('newstopic', $sTopic); $tpl->assign('newstext', $newstext); // in DB schreiben sql("INSERT INTO `news` (`content`, `topic`, `display`) VALUES ('&1', '&2', '&3')", $newstext, $topicid, 0); $rs = sql("SELECT `email` FROM `user` WHERE `admin`\\&'&1'='&1'", ADMIN_USER); while ($r = sql_fetch_assoc($rs)) { // send confirmation $mail = new mail(); $mail->name = 'newstopic'; $mail->to = $r['email']; $mail->subject = $translate->t('A newsentry was created on opencaching', '', basename(__FILE__), __LINE__); $mail->assign('email', $email); $mail->assign('newstopic', $sTopic); $mail->assign('newstext', $newstext); $mail->send(); } sql_free_result($rs); // erfolg anzeigen $tpl->display(); exit; } if ($emailok != true) { $tpl->assign('email_error', 1); } if ($captchaok != true) { $tpl->assign('captcha_error', 1); } } $tpl->assign('newstext', $newstext); $tpl->assign('newshtml', $newshtml);
/** * 留言回复 */ public function do_edit() { $request_data = $this->input->post(); if ($_POST) { //数据验证 $validation = Validation::factory($request_data)->add_rules('message_id', 'required', 'digit')->add_rules('content', 'required', 'length[0,65535]'); if (!$validation->validate()) { remind::set(Kohana::lang('o_global.input_error'), request::referrer()); } $message = MessageService::get_instance()->get($request_data['message_id']); if (empty($message['id'])) { remind::set(Kohana::lang('o_global.access_denied'), request::referrer(), 'error'); } $set_data = array('message_id' => $message['id'], 'manager_id' => $this->manager_id, 'content' => $request_data['content'], 'update_timestamp' => date('Y-m-d H:i:s')); //判断此管理员是否已经回复过 $message_reply_service = Message_replyService::get_instance(); $manager_reply = $message_reply_service->get_reply_by_manager_id($this->manager_id, $message['id']); if (isset($manager_reply) && !empty($manager_reply['id'])) { $message_reply_service->set($manager_reply['id'], $set_data); } else { $set_data['create_timestamp'] = date('Y-m-d H:i:s'); $message_reply_service->add($set_data); //把留言的回复状态改为已回复 $message_data['is_reply'] = MessageService::IS_MANAGER_REPLY; MessageService::get_instance()->set($message['id'], $message_data); } //发送邮件 if ($request_data['send_mail'] == '1') { $email_flag = 'the answer of your question'; $email = $message['email']; $name = Mymanager::instance($message['manager_id'])->get('name'); $content = ''; $content .= 'Dear ' . $name . ' :<br>'; $content .= $request_data['content']; if (mail::send($email, $email_flag, $content)) { remind::set(Kohana::lang('o_global.mail_send_success')); } else { remind::set(Kohana::lang('o_global.mail_send_error'), 'manage/message/edit?id=' . $message['id']); } } remind::set(Kohana::lang('o_manage.message_success'), 'manage/message', 'success'); } else { remind::set(Kohana::lang('o_manage.message_error'), 'manage/message/edit?id=' . $message['id']); } }
/** * Schickt ein Status-Mail an die Kontaktperson der Bestellung * * @param $bestellung Bestellung Object der Bestellung * @param $status Art der Statusaenderung (bestellt|geliefert|freigabe|storno) */ function sendBestellerMail($bestellung, $status) { global $date; $tags = new tags(); $tags->GetTagsByBestellung($bestellung->bestellung_id); $tagsAusgabe = ''; foreach ($tags->result as $res) { if ($tagsAusgabe != '') { $tagsAusgabe .= ', '; } $tagsAusgabe .= $res->tag; } $msg = ''; $kst_mail = new wawi_kostenstelle(); $kst_mail->load($bestellung->kostenstelle_id); $firma_mail = new firma(); $firma_mail->load($bestellung->firma_id); $konto_mail = new wawi_konto(); $konto_mail->load($bestellung->konto_id); // E-Mail an Kostenstellenverantwortliche senden $email = "Dies ist eine automatisch generierte E-Mail.<br><br>"; switch ($status) { case 'bestellt': $email .= " <b>Ihre Bestellung wurde bestellt</b>"; break; case 'geliefert': $email .= " <b>Ihre Bestellung wurde geliefert</b><br>Hinweis: Nach erfolgter Lieferung werden Waren ab einem Wert von EUR 250,-- pro Einzelposition inventarisiert. <br>"; break; case 'freigabe': $email .= " <b>Ihre Bestellung wurde freigegeben</b>"; break; case 'storno': $email .= " <b>Ihre Bestellung wurde storniert</b>"; break; } $email .= "<br>"; $email .= "Kostenstelle: " . $kst_mail->bezeichnung . "<br>"; $email .= "Bestellnummer: " . $bestellung->bestell_nr . "<br>"; $email .= "Titel: " . $bestellung->titel . "<br>"; $email .= "Firma: " . $firma_mail->name . "<br>"; $email .= "Erstellt am: " . $date->formatDatum($bestellung->insertamum, 'd.m.Y') . "<br>"; $email .= "Kostenstelle: " . $kst_mail->bezeichnung . "<br>Konto: " . $konto_mail->kurzbz . "<br>"; $email .= "Tags: " . $tagsAusgabe . "<br>"; $email .= "Link: <a href='" . APP_ROOT . "index.php?content=bestellung.php&method=update&id={$bestellung->bestellung_id}'>zur Bestellung </a>"; $mail = new mail($bestellung->besteller_uid . '@' . DOMAIN, 'no-reply', 'Bestellung ' . $bestellung->bestell_nr, 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.'); $mail->setHTMLContent($email); if (!$mail->send()) { $msg .= '<span class="error">Fehler beim Senden des Mails</span><br />'; } else { $msg .= ' Mail verschickt an ' . $bestellung->besteller_uid . '@' . DOMAIN . '!<br>'; } return $msg; }
public function send(){ $mail_configs['appid']=$this->appid; $mail_configs['appkey']=$this->appkey; if($this->sign_type!=''){ $mail_configs['sign_type']=$this->sign_type; } $mail=new mail($mail_configs); return $mail->send($this->buildRequest()); }
function sendMailStudent($uid) { $email = $uid . "@technikum-wien.at"; $emailtext = "Dies ist eine automatisch generiert E-Mail.<br><br>"; $emailtext .= "Es wurde für Ihr Auslandssemester die Universität bestätigt.<br>"; $emailtext .= "Bitte füllen Sie auf der Registrationsseite Ihre zusätzlichen Daten aus."; $mail = new mail($email, 'no-reply', 'Bestätigung des Auslandsemesters', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.'); $mail->setHTMLContent($emailtext); $mail->send(); }
/** * New password * @return void */ public function renew() { if (!user::is_logged()) { $this->add_breadcrumb(Kohana::lang('user.renew_password'), url::current()); $this->set_title(Kohana::lang('user.renew_password')); // default values $form = array('email' => '', 'code' => ''); $errors = $form; if ($_POST) { $post = new Validation($_POST); // Some filters $post->pre_filter('trim', TRUE); // Rules $post->add_rules('email', 'required', 'email'); $post->add_rules('code', 'required'); $post->add_callbacks('email', array($this->user, '_code_match')); $post->add_callbacks('email', array($this->user, '_not_banned')); if ($post->validate()) { // create new password and save it $new = string::random_code(); $this->user->change_password($post['email'], $new); // send email to user $mail = new View('mail_renew_password'); $mail->new = $new; mail::send($post['email'], Kohana::lang('user.new_password'), $mail); // redirect user to next page url::redirect('/user/login/renewed'); } else { // Repopulate form with error and original values $form = arr::overwrite($form, $post->as_array()); $errors = $post->errors('users_renew_errors'); } } $this->template->content = new View('renew'); $this->template->content->form = $form; $this->template->content->errors = $errors; } else { url::redirect('/user/profile'); } }
/** * void mail() * sends a mail after creating/changing a request * @access private */ function mail($msgBody) { global $config, $loginInst; if (!$config['automail']) { return false; } $link = $config['root_url'] . "/index.php?content=requestdetails.php&view=details&requestid=" . $this->id; $projectInst = new project($this->projectId); $userInst = new user($projectInst->managerId); $mailInst = new mail(); $mailInst->senderId = $loginInst->id; $mailInst->recipientId = $userInst->id; $mailInst->priorityId = $this->priorityId; $mailInst->subject = "PMTool: (REQUEST) " . $projectInst->name . " (" . $this->subject . ")"; $mailbody = "Hello " . $userInst->name . ",\n\n"; $mailbody .= $msgBody . "\n\n"; $mailbody .= "project : " . $projectInst->name . "\n"; $mailbody .= "subject : " . $this->subject . "\n"; $mailbody .= "priority : " . $this->getPriorityName() . "\n"; $mailbody .= "type : " . $this->getTypeName() . "\n"; $mailbody .= "body : " . eregi_replace("\n", "\n ", $this->body) . "\n\n"; $mailbody .= "link : " . $link . "\n\n"; $mailbody .= "\n--- \nHave fun ;)\n"; $mailInst->body = $mailbody; $mailInst->send(); }
/** * Send errors to admin */ public static function send_errors_to_admin() { // determine if we need to send anything $found = false; foreach (error_base::$errors as $k => $v) { if ($v['errno'] != -1) { $found = true; break; } } // we do not send suppresed errors to admin for now. !empty(self::$data['suppressed']) if ($found || !empty(self::$data['js'])) { $message = str_replace('display: none;', '', self::render()); return mail::send(['to' => self::$email, 'subject' => 'application error', 'message' => $message]); } }
$akte->new = true; if (!$akte->save()) { echo "<b>Fehler: {$akte->errormsg}</b>"; } else { echo "<b>" . $p->t('global/erfolgreichgespeichert') . "</b>"; } echo "<script>window.opener.location.reload();</script>"; if ($akte->dokument_kurzbz == "LearnAgr") { // sende Email zu Assistenz $person = new person(); $person->load($_GET['person_id']); $emailtext = "Dies ist eine automatisch generierte E-Mail.<br><br>"; $emailtext .= "Es wurde ein neues Dokument auf das System hochgeladen.<br><br>Vorname/Nachname: <b>" . $person->vorname . " " . $person->nachname . "</b><br>Dokumenttyp: <b>Learning Agreement</b>"; $mail = new mail(MAIL_INTERNATIONAL, 'no-reply', 'Learning-Agreement Upload', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.'); $mail->setHTMLContent($emailtext); if (!$mail->send()) { $msg = '<span class="error">Fehler beim Senden des Mails</span><br />'; } else { $msg = $p->t('global/emailgesendetan'); } } } } if (isset($_GET['person_id'])) { $dokument = new dokument(); $dokument->getAllDokumente(); echo "\t<form method='POST' enctype='multipart/form-data' action='{$PHP_SELF}?person_id=" . $_GET['person_id'] . "'>\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . $p->t('incoming/dokument') . ":</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input type='file' name='bild' />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . $p->t('incoming/dokumenttyp') . ":</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t <SELECT name='dokumenttyp'>"; foreach ($dokument->result as $dok) { if ($dok->dokument_kurzbz == 'Lebenslf' || $dok->dokument_kurzbz == 'Motivat' || $dok->dokument_kurzbz == 'Zeugnis' || $dok->dokument_kurzbz == 'Lichtbil' || $dok->dokument_kurzbz == 'LearnAgr') { $selected = ""; if ($dok->dokument_kurzbz == $dokumenttyp) {
/** * Funktion sendet den ausgewählten Termin an alle Ressourcen aus der übergebenen Coodleumfrage * @global phrasen $p * @param type $coodle_id * @param type $auswahl */ function sendEmail($coodle_id) { global $mailMessage; global $p; $coodle_help = new coodle(); $termin_id = $coodle_help->getTerminAuswahl($coodle_id); $coodle_help->loadTermin($termin_id); $coodle_ressource = new coodle(); $coodle_ressource->getRessourcen($coodle_id); $coodle = new coodle(); $coodle->load($coodle_id); $ort = ''; $teilnehmer = ''; foreach ($coodle_ressource->result as $row) { if ($row->ort_kurzbz != '') { if ($ort != '') { $ort .= ', '; } $ort .= "{$row->ort_kurzbz}"; } else { if ($row->uid != '') { $benutzer = new benutzer(); $benutzer->load($row->uid); $name = trim($benutzer->titelpre . ' ' . $benutzer->vorname . ' ' . $benutzer->nachname . ' ' . $benutzer->titelpost); $mail = $row->uid . '@' . DOMAIN; } else { $mail = $row->email; $name = $row->name; } $coodle_ressource_termin = new coodle(); $partstat = ''; if ($coodle_ressource_termin->checkTermin($termin_id, $row->coodle_ressource_id)) { $partstat = 'ACCEPTED'; } else { $partstat = 'TENTATIVE'; } $teilnehmer .= 'ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=' . $partstat . ';CN=' . $name . "\n :MAILTO:" . $mail . "\n"; } } $date = new DateTime($coodle_help->datum . ' ' . $coodle_help->uhrzeit); //Datum des Termins ins richtige Format bringen $dtstart = $date->format('Ymd\\THis'); //Ende Datum berechnen $interval = new DateInterval('PT' . $coodle->dauer . 'M'); $date->add($interval); $dtend = $date->format('Ymd\\THis'); $date = new DateTime(); $dtstamp = $date->format('Ymd\\THis'); $benutzer = new benutzer(); $benutzer->load($coodle->ersteller_uid); $erstellername = trim($benutzer->titelpre . ' ' . $benutzer->vorname . ' ' . $benutzer->nachname . ' ' . $benutzer->titelpost); //Ical File erstellen $ical = "BEGIN:VCALENDAR\nPRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN\nVERSION:2.0\nMETHOD:PUBLISH\nBEGIN:VTIMEZONE\nTZID:Europe/Vienna\nBEGIN:DAYLIGHT\nTZOFFSETFROM:+0100\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU\nDTSTART:19810329T020000\nTZNAME:GMT+02:00\nTZOFFSETTO:+0200\nEND:DAYLIGHT\nBEGIN:STANDARD\nTZOFFSETFROM:+0200\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU\nDTSTART:19961027T030000\nTZNAME:GMT+01:00\nTZOFFSETTO:+0100\nEND:STANDARD\nEND:VTIMEZONE\nBEGIN:VEVENT\nORGANIZER:MAILTO:" . $erstellername . " <" . $coodle->ersteller_uid . "@" . DOMAIN . "\n" . $teilnehmer . "\nDTSTART;TZID=Europe/Vienna:" . $dtstart . "\nDTEND;TZID=Europe/Vienna:" . $dtend . "\nLOCATION:" . $ort . "\nTRANSP:OPAQUE\nSEQUENCE:0\nUID:FHCompleteCoodle" . $coodle_id . "\nDTSTAMP;TZID=Europe/Vienna:" . $dtstamp . "\nDESCRIPTION:" . strip_tags(html_entity_decode($coodle->beschreibung, ENT_QUOTES, 'UTF-8')) . "\nSUMMARY:" . strip_tags($coodle->titel) . "\nPRIORITY:5\nCLASS:PUBLIC\nEND:VEVENT\nEND:VCALENDAR"; if (count($coodle_ressource->result) > 0) { foreach ($coodle_ressource->result as $row) { if ($row->uid != '') { $benutzer = new benutzer(); if (!$benutzer->load($row->uid)) { $mailMessage .= "Fehler beim Laden des Benutzers " . $coodle_ressource->convert_html_chars($row->uid); continue; } if ($benutzer->geschlecht == 'w') { $anrede = "Sehr geehrte Frau "; } else { $anrede = "Sehr geehrter Herr "; } $anrede .= $benutzer->titelpre . ' ' . $benutzer->vorname . ' ' . $benutzer->nachname . ' ' . $benutzer->titelpost; // Interner Teilnehmer $email = $row->uid . '@' . DOMAIN; } elseif ($row->email != '') { // Externe Teilnehmer $email = $row->email; $anrede = 'Sehr geehrte(r) Herr/Frau ' . $row->name; } else { // Raueme bekommen kein Mail continue; } $anrede = trim($anrede); $sign = $p->t('mail/signatur'); $datum = new datum(); $html = $anrede . '!<br><br> Die Terminumfrage zum Thema "' . $coodle_ressource->convert_html_chars($coodle->titel) . '" ist beendet. <br> Der Termin wurde auf den <b>' . $datum->formatDatum($coodle_help->datum, 'd.m.Y') . ' ' . $coodle_help->uhrzeit . '</b> festgelegt. <br><br>' . nl2br($sign); $text = $anrede . "!\n\nDie Terminumfrage zum Thema \"" . $coodle_help->convert_html_chars($coodle->titel) . '"\\" ist beendet.\\n Der Termin wurde auf den <b>' . $datum->formatDatum($coodle_help->datum, 'd.m.Y') . ' ' . $coodle_help->uhrzeit . "</b> festgelegt\n.\n \n\n{$sign}"; $mail = new mail($email, 'no-reply@' . DOMAIN, 'Terminbestätigung - ' . $coodle->titel, $text); $mail->setHTMLContent($html); //ICal Termineinladung hinzufuegen $mail->addAttachmentPlain($ical, 'text/calendar', 'meeting.ics'); if ($mail->send()) { $mailMessage .= $p->t('coodle/mailVersandtAn', array($email)) . "<br>"; } } } else { die($p->t('coodle/keineRessourcenVorhanden')); } }
private function _send_email($tomail, $toname, $title, $body) { $email = new mail(); $email->send($tomail, $toname, $title, $body); }
/** * void mail() * sends a mail after creating/changing a task * @access private */ function mail($recipientId, $msgBody) { global $config, $loginInst, $toolInst; if (!$config['automail']) { return false; } $userInst = new user($this->userId); $projectInst = new project($this->projectId); $link = $config['root_url'] . "/index.php?content=taskdetails.php&view=details&taskid=" . $this->id; $mailInst = new mail(); $mailInst->senderId = $loginInst->id; $mailInst->recipientId = $recipientId; $mailInst->priorityId = $this->priorityId; $mailInst->subject = "PMTool: " . $projectInst->name . " (" . $this->subject . ")"; $mailbody = "Hello " . $userInst->name . ",\n\n"; $mailbody .= $msgBody . "\n\n"; $mailbody .= "ID : " . $this->id . "\n"; $mailbody .= "project : " . $projectInst->name . "\n"; $mailbody .= "subject : " . $this->subject . "\n"; $mailbody .= "priority : " . $this->getPriorityName() . "\n"; $mailbody .= "type : " . $this->getTypeName() . "\n"; $mailbody .= "status : " . $this->getStatusName() . "\n"; $mailbody .= "finish : " . $toolInst->getTime("", $this->finish) . "\n"; $mailbody .= "planned hours : " . $this->plannedHours . "\n"; $mailbody .= "body : " . eregi_replace("\n", "\n ", $this->body) . "\n\n"; $mailbody .= "link : " . $link . "\n\n"; $mailbody .= "\n--- \nHave fun ;)\n"; $mailInst->body = $mailbody; $mailInst->send(); }
/** * * Funktion nimmt Fehler entgegen und sendet sie an Admin * @param $parameters -> XML SOAP File */ function SendStipendienbezieherStipError($parameters) { $xmlData = file_get_contents('php://input'); $log = new webservicelog(); $log->request_data = file_get_contents('php://input'); $log->webservicetyp_kurzbz = 'stip'; //$log->request_id = $AnfrageDatenID; $log->beschreibung = "Stip Error"; $log->save(true); //1=successful; 2=incomplete xml document; 3=incomplete processing; 4=system-error if ($parameters->errorReport->ErrorStatusCode != 1) { $mail = new mail(MAIL_ADMIN, 'vilesci@' . DOMAIN, 'STIP - Error', $xmlData); $mail->send(); } }
function create($text, $persons, $groups) { $data['text'] = $text; $data['text_slashes'] = addslashes($text); $data['created'] = date('Y-m-d H:i:s'); $data['author_first_name'] = $_SESSION['first_name']; $data['author_last_name'] = $_SESSION['last_name']; foreach ($groups as $id => $name) { $group = new group($id); foreach ($group->members as $i => $member) { $persons[$member['member_id']] = $member; } } foreach ($persons as $id => $arr) { $person = new person(); $person->load($id); $persons[$id] = $person->data; } $this->to = $persons; $this->set_data($data); } function insert() { global $db; $query = 'messages (author, created, text) values ( "' . $_SESSION['userid'] . '", now(), "' . $this->data['text_slashes'] . '" )'; $db->insert($query); $message_id = $db->insert_id; $author = new person();
private function _sendAuthEmail($email, $activation_key) { $mail = new mail(); $body = getEmailTpl('authEmail', array('activate_url' => __APP__ . '/auth/authEmail/user/' . $_SESSION['uid'] . '/key/' . $activation_key)); if ($mail->send($email, C('WEB_NAME') . '用户', $body['subject'], $body['content'])) { return TRUE; } return FALSE; }
public function send() { /* |set appid and appkey |-------------------------------------------------------------------------- */ $mail_configs['appid'] = $this->appid; $mail_configs['appkey'] = $this->appkey; /* |set sign_type,if is set |-------------------------------------------------------------------------- */ if ($this->sign_type != '') { $mail_configs['sign_type'] = $this->sign_type; } /* |init mail class |-------------------------------------------------------------------------- */ $mail = new mail($mail_configs); /* |build request and send email and return the result |-------------------------------------------------------------------------- */ return $mail->send($this->buildRequest()); }
} else { //MAIL an Assistenz verschicken $qry_person = "SELECT vorname, nachname \n\t\t\t\t\t\t\t\t\tFROM public.tbl_person JOIN public.tbl_preinteressent USING(person_id) \n\t\t\t\t\t\t\t\t\tWHERE preinteressent_id='{$preinteressent->preinteressent_id}'"; $name = ''; if ($result_person = $db->db_query($qry_person)) { if ($row_person = $db->db_fetch_object($result_person)) { $name = $row_person->nachname . ' ' . $row_person->vorname; } } $stg_obj = new studiengang(); $stg_obj->load($zuordnung->studiengang_kz); $to = $stg_obj->email; //$to = '*****@*****.**'; $message = "Dies ist eine automatische Mail! {$stg_obj->email}\n\n" . "Der Preinteressent {$name} wurde zur Übernahme freigegeben. \nSie können diesen " . "im FAS unter 'Extras->Preinteressenten übernehmen' oder unter folgendem Link\n\n" . APP_ROOT . "vilesci/personen/preinteressent_uebernahme.php?studiengang_kz={$zuordnung->studiengang_kz} \n" . "ins FAS übertragen"; $mail = new mail($to, 'vilesci@' . DOMAIN, 'Preinteressent Freigabe', $message); if ($mail->send()) { echo "<br><b>Freigabemail wurde an {$to} versendet</b>"; } else { echo "<br><b>Fehler beim Versenden des Freigabemails an {$to}</b>"; } } } else { echo '<b>Diese Zuteilung ist bereits freigegeben</b>'; } } else { echo '<b>Fehler beim Speichern der Daten: Datensatz wurde nicht gefunden</b>'; } } else { echo '<b>Es muss ein Studiensemester eingetragen sein damit diese Person freigegeben werden kann</b>'; } }
/** * Adding users to the database */ function add() { if (empty($this->params['data'])) { $this->set('tracking_image', 'userpanel1-form.gif'); $this->render(); } else { /** * @todo The captcha stuff should be moved to a component (instead of a vendor * package). The manual error handling and vendor code was added because * of time constraints (namely, this needs to be done in the next 22 * minutes) */ // They didn't fill in a value if (empty($_SESSION['freecap_word_hash']) || empty($this->params['data']['captcha'][0])) { $form_captcha_error = 'You must enter the code above. If you are unable to see the code, please <a href="mailto:firefoxsurvey@mozilla.com">email us.</a>'; $this->set('form_captcha_error', $form_captcha_error); return; } // Just some sanity checking. If a user messes with their cookie // manually, they could be trying to execute custom functions if (!in_array($_SESSION['hash_func'], array('sha1', 'md5', 'crc32'))) { // fail silently? return; } // Check the captcha values if ($_SESSION['hash_func'](strtolower($this->params['data']['captcha'][0])) != $_SESSION['freecap_word_hash']) { $form_captcha_error = 'The code you entered did not match the picture. Please try again.'; $this->set('form_captcha_error', $form_captcha_error); return; } else { //reset session values $_SESSION['freecap_attempts'] = 0; $_SESSION['freecap_word_hash'] = false; } // If they've already signed up, send them another email if ($this->User->findByEmail($this->params['data']['User']['email'])) { $mail_params = array('from' => 'Firefox User Panel <*****@*****.**>', 'envelope' => '*****@*****.**', 'to' => $this->params['data']['User']['email'], 'subject' => 'Firefox User Panel', 'message' => "\n<p>Thanks for volunteering to be a part of the Firefox User Panel!</p>\n\n<p>Please start by taking this short initial survey. \nWe're anxious to get your feedback on a variety of areas, so we'll send out a few\nmore surveys in the following weeks to the user panel to help us define the next\ngeneration of Firefox. Thanks again for making the browser a better place!</p>\n\n<p><a href=\"https://is4.instantsurvey.com/take?i=105913&h=0yU72vyhajHZpq6bAu_RGQ&email={$this->params['data']['User']['email']}&first={$this->params['data']['User']['firstname']}&last={$this->params['data']['User']['lastname']}\">Join the User Panel</a></p>\n\n<p><small>Mozilla continues to take security and privacy issues seriously. Mozilla\nwill never rent or sell the information you provide in connection with the Firefox\nUser Panel to any other third party for use in marketing or solicitation.</small></p>\n\n<p><small>If you choose not to take this survey, you will be automatically unsubscribed from the Firefox User Panel or you can <a href=\"mailto:firefoxsurvey@mozilla.com?subject=Unsubscribe - Firefox User Panel\">let us know</a></small></p>\n\n<p><small>If you think you received this in error, please <a href=\"mailto:firefoxsurvey@mozilla.com?subject=Firefox User Panel - Received in Error\">let us know</a></small></p>\n"); $mail = new mail($mail_params); $mail->send(); $this->layout = 'submit'; $this->set('content', ' <p>You are already signed up for the Firefox User Panel!</p> <p>If you don\'t receive an email with a link to the survey within 24 hours, please check your junk mail. If you still haven\'t received an email with a link to the survey please <a href="mailto:firefoxsurvey@mozilla.com?subject=Firefox User Panel - Email not received">let us know</a> and we\'ll send another copy.</p> <p>Continue to <a href="http://www.mozilla.com/firefox/central/">Firefox Central</a>.</p> '); $this->set('tracking_image', 'userpanel3-alreadysignedup.gif'); $this->render(); return; } if ($this->User->save($this->params['data'])) { $mail_params = array('from' => 'Firefox User Panel <*****@*****.**>', 'to' => $this->params['data']['User']['email'], 'envelope' => '*****@*****.**', 'subject' => 'Firefox User Panel', 'message' => "\n<p>Thanks for volunteering to be a part of the Firefox User Panel!</p>\n\n<p>Please start by taking this short initial survey. \nWe're anxious to get your feedback on a variety of areas, so we'll send out a few\nmore surveys in the following weeks to the user panel to help us define the next\ngeneration of Firefox. Thanks again for making the browser a better place!</p>\n\n<p><a href=\"https://is4.instantsurvey.com/take?i=105913&h=0yU72vyhajHZpq6bAu_RGQ&email={$this->params['data']['User']['email']}&first={$this->params['data']['User']['firstname']}&last={$this->params['data']['User']['lastname']}\">Join the User Panel</a></p>\n\n<p><small>Mozilla continues to take security and privacy issues seriously. Mozilla\nwill never rent or sell the information you provide in connection with the Firefox\nUser Panel to any other third party for use in marketing or solicitation.</small></p>\n\n<p><small>If you choose not to take this survey, you will be automatically unsubscribed from the Firefox User Panel or you can <a href=\"mailto:firefoxsurvey@mozilla.com?subject=Unsubscribe - Firefox User Panel\">let us know</a></small></p>\n\n<p><small>If you think you received this in error, please <a href=\"mailto:firefoxsurvey@mozilla.com?subject=Firefox User Panel - Received in Error\">let us know</a></small></p>\n"); $mail = new mail($mail_params); $mail->send(); $this->layout = 'submit'; $this->set('content', ' <p>Thanks for helping us make a better browser!</p> <p>Be sure to check your email for a link to the first survey.<br /> Continue to <a href="http://www.mozilla.com/firefox/central/">Firefox Central</a>.</p> <p class="subtext">If you don\'t receive an email with a link to the survey within 24 hours, please check your junk mail or <a href="mailto:firefoxsurvey@mozilla.com?subject=Firefox User Panel - Email not received.">let us know</a> and we\'ll send another copy.</p> '); $this->set('tracking_image', 'userpanel2-response.gif'); $this->render(); } } }