myPortal CMS - the web design community
  • MyPortal 2.0
  • download
  • demo
  • manual
  • editor
  • faq
  • blog
  • forum

free account: Click here
Username: Password:

Manual

mail functions

emcrypt($email)

encrypt mail to nonhuman readable

echo emcrypt($email);
// #EM#706e66736b7767476d6d637f637f207c79#EM#

emdecrypt($email)

decrypt mail to nonhuman readable

echo emdecrypt('#EM#706e66736b7767476d6d637f637f207c79#EM#');
// test@example.com

hidemail($text)

parses mails from text and encrypt them

$text = "this si my email: example@example.si";
echo hidemail($text);
// this si my email: #EM#706e66736b7767476d6d637f637f207c79#EM#

showmail($text)

parses hidden mails from text and decrypt them

$text = "this si my email: #EM#706e66736b7767476d6d637f637f207c79#EM#";
echo hidemail($text);
// this si my email: example@example.si

system_mail_template($templateid,$datavars=array())

generate mail content from system mail template

loadhelper('mail');
 
$mail = new mail();
$mail->from = 'system@mail.com';
$mail->to = 'mail@mail.com';
$mail->subject = "system";
$mail->message = system_mail_template(17,array('aaa'=>'1','bbb'=>2));
$mail->send();

Try myPortal 2: