public function sendmailfinal($isok) { if (is_null($this->user->bestEmail())) { $this->user->select(UserSelect::base()); } $mail = new FrankizMailer('validate/mail.valid.member.tpl'); if (Env::has("ans")) { $mail->assign('comm', Env::v('ans')); } $mail->assign('isOk', $isok); $mail->assign('targetGroup', $this->group); if ($isok) { $mail->Subject = '[Frankiz] Ta demande de membre a été acceptée'; } else { $mail->Subject = '[Frankiz] Ta demande de membre a été refusée'; } $mail->SetFrom($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->AddAddress($this->user->bestEmail(), $this->user->displayName()); $mail->AddCC($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->Send(false); }
public function sendmailfinal($isok) { $mail = new FrankizMailer('validate/mail.valid.mail.tpl'); $mail->assign('comm', Env::v('ans', '')); $mail->assign('targetGroup', $this->formation); if ($isok) { $mail->Subject = '[Frankiz] Ton mail a été accepté'; } else { $mail->Subject = '[Frankiz] Ton mail a été refusé'; $mail->assign('text', $this->body); } $mail->SetFrom($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->AddAddress($this->writer->bestEmail(), $this->writer->displayName()); $mail->AddCC($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->Send(false); }
public function sendmailfinal($isok) { if ($this->writer->bestEmail() === null) { $this->writer->select(UserSelect::base()); } $mail = new FrankizMailer('validate/mail.valid.activity.tpl'); $mail->assign('isok', $isok); $mail->assign('valid_origin', $this->valid_origin); $mail->assign('comm', Env::v('ans', '')); $mail->assign('targetGroup', $this->target->group()); $mail->assign('origin', $this->origin); if ($isok && !$this->valid_origin) { $mail->Subject = '[Frankiz] Ton activité a été validée'; } elseif ($isok) { $mail->Subject = '[Frankiz] Le groupe d\'origine de ton activité a été validé'; } else { $mail->Subject = '[Frankiz] Ton activité a été refusée'; } $mail->SetFrom($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->AddAddress($this->writer->bestEmail(), $this->writer->displayName()); $mail->AddCC($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->Send(false); }
public function sendmailcancel($user) { $mail = new FrankizMailer('validate/mail.cancel.tpl'); $mail->assign('type', $this->type); $mail->assign('user', $user); $mail->Subject = "Annulation de la demande de type \"{$this->label()}\""; $mail->SetFrom($user->bestEmail(), $user->displayName()); $mail->AddAddress($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->Send(false); }
public function sendmailfinal($isok) { if (is_null($this->writer->bestEmail())) { $this->writer->select(User::SELECT_BASE); } $mail = new FrankizMailer('validate/mail.valid.licenses.tpl'); $mail->assign('isok', $isok); $mail->assign('software_name', $this->softwareName()); if (Env::has("ans")) { $mail->assign('comm', Env::v('ans')); } if ($isok) { $mail->Subject = '[Frankiz] Ta demance de licence a été acceptée'; } else { $mail->Subject = '[Frankiz] Ta demance de licence a été refusée'; } $mail->SetFrom($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->AddAddress($this->writer->bestEmail(), $this->writer->displayName()); $mail->AddCC($this->_mail_from_addr(), $this->_mail_from_disp()); $mail->Send(false); }
public function handler_recovery($page) { global $globals; $page->addCssLink('profile.css'); $page->changeTpl('profile/recovery.tpl'); $page->assign('title', 'Nouveau mot de passe'); // Step 1 : Ask the email $page->assign('step', 'ask'); // Step 2 : Send the recovery mail if (Env::t('mail', '') != '') { // TODO: Accept forlife too list($forlife, $domain) = explode('@', Env::t('mail'), 2); $uf = new UserFilter(new UFC_Forlife($forlife, $domain)); $user = $uf->get(true); if (!$user) { $page->assign('error', 'true'); return; } $user->select(UserSelect::base()); $page->assign('email', Env::t('mail')); $mail = new FrankizMailer('profile/recovery.mail.tpl'); $hash = rand_url_id(); $user->hash($hash); $mail->assign('hash', $hash); $mail->assign('uid', $user->id()); $mail->SetFrom($globals->mails->web, 'Les Webmestres de Frankiz'); $mail->AddAddress($user->bestEmail(), $user->displayName()); $mail->subject('[Frankiz] Changement de mot de passe'); $mail->Send($user->isEmailFormatHtml()); $page->assign('step', 'mail'); } // Step 2 : Send a new password if (Env::v('hash', '') != '' && Env::v('uid', '') != '') { $user = new User(Env::v('uid')); $user->select(UserSelect::base()); if (Env::v('hash') == $user->hash()) { // TODO: log the session opening $mail = new FrankizMailer('profile/recovery_new.mail.tpl'); $new = rand_url_id(); $user->hash(''); $user->password($new); $mail->assign('new_password', $new); $mail->SetFrom($globals->mails->web, 'Les Webmestres de Frankiz'); $mail->AddAddress($user->bestEmail(), $user->displayName()); $mail->subject('[Frankiz] Nouveau mot de passe'); $mail->Send($user->isEmailFormatHtml()); $page->assign('step', 'password'); } else { $page->assign('step', 'expired'); } } }
public static function send($keys, $user = null) { if ($user == null) { $user = S::user(); } $mail = new FrankizMailer('licenses/licenses_key.mail.tpl'); $mail->assign('keys', $keys); $mail->assign('multiple', count($keys) > 1); $mail->assign('pub_domain', in_array(Post::v('software'), License::getDomainSoftwares())); $mail->Subject = '[Frankiz] Ta licence MSDNAA'; $mail->SetFrom('*****@*****.**', 'admin@windows'); $mail->AddAddress($user->bestEmail(), $user->displayName()); $mail->AddCC('*****@*****.**', 'admin@windows'); $mail->Send(false); }