emailconfirmuser

emailconfirmuser
SYNOPSIS

emailcrypto($user_id, $user_mail, $locale, $sender=false)

CODE
  1. require_once 'emailtext.php';
  2. require_once 'urlencodeaction.php';
  3.  
  4. function emailconfirmuser($user_id, $user_mail, $locale, $sender=false) {
  5.     global $base_url;
  6.  
  7.     $saction_page=url('saction', $locale);
  8.  
  9.     if (!$saction_page) {
  10.         return false;
  11.     }
  12.  
  13.     $id=CONFIRMNEWUSER;
  14.     $param=$user_id;
  15.  
  16.     $s64=urlencodeaction($id, $param);
  17.  
  18.     if (!$s64) {
  19.         return false;
  20.     }
  21.  
  22.     $url = $base_url . $saction_page . '/' . $s64;
  23.  
  24.     $to=$user_mail;
  25.     $subject = translate('email:new_user_subject', $locale);
  26.     $f=translate('email:new_user_confirm', $locale);
  27.     $s=sprintf($f, $url);
  28.     $msg = $s . "\n\n" . translate('email:salutations', $locale);
  29.  
  30.     return @emailtext($msg, $to, $subject, $sender);
  31. }
SEE ALSO

urlencodeaction, translate, emailtext

Comments

To add a comment, click here.