Beispiel #1
0
        function fogetPassword($adminId, $adminPW)
        {
            $systemSetting = new systemSetting();
            $common = new common();
            $systemSetting->extractor($systemSetting->getSettings());
            $Administrator = new administrator();
            $Administrator->setAdminId($adminId);
            $Administrator->extractor($Administrator->getAdministratorByAdminId());

            $subject = $systemSetting->sySettingCompanyName() . "  Reset Your Password !";
            $EmailMessage = '<table width="785" border="0" cellpadding="20" cellspacing="0">
	  <tr>
	  <td width="-34" bgcolor="#333333" style="font-family:Arial, Helvetica, sans-serif; font-size:20px; color:#000; padding:4px 0 4px 5px;">&nbsp;</td>
	  <td width="699" align="left" bgcolor="#333333"><img src="' . DOC_ROOT . 'uplode-img/company-logo/' . $systemSetting->sySettingCompanyLogo() . '" /></td>
	  </tr>
	  <tr>
	  <td colspan="2" bgcolor="#f0f0f0" style=" font-family:arial; font-size:13px;">
	  <br>
	  Dear <strong> ' . $Administrator->getAdminName() . '</strong>, <br/><br/>
	 Thank you for confirming, following is your username and temporary password. 
      <br>
	 <br>
	 <p>
	  
	  <strong>Panel Username :</strong> ' . $Administrator->getAdminUsername() . '<br/>
	  <strong>Panel Password :</strong> <span style="color:#F00"><strong> ' . $adminPW . '</strong> </span><br/>
	  <br/><br/>
	  
	  <p>
	 Thanking you for taking the time in shopping online with us.
  <br/>
	  ' . $systemSetting->sySettingCompanyName() . '<br/><br/>
	  
	  Best Regards,<br/>
	  Web Administrator<br/>
	  <strong>' . $systemSetting->sySettingCompanyName() . '  - on ' . date('Y-m-d h:i a') . '</strong><br/>
	  </p>
	  
	  
	  <hr/>
	  <span style="color:#666; font-size:11px; font-family:Arial, Helvetica, sans-serif;">You are receiving this email, because an account has been registered at the ' . $systemSetting->sySettingCompanyName() . ' Online Shoping cart  portal. If you have not made any registration or unaware of the same, please email administrator at ' . $systemSetting->sySettingCompanyEmail() . ' to remove you from this panel.</span>
	  </td>
	  </tr>
	  </table>
';

            $mail = new PHPMailer();
            $mail->IsSMTP();
            $mail->SMTPAuth = true; // enable SMTP authentication
            $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
            $mail->Host = $systemSetting->sySettingHost(); // sets GMAIL as the SMTP server
            $mail->Port = $systemSetting->sySettingPort(); // set the SMTP port

            $mail->Username = $systemSetting->sySettingSmtpUsername(); // GMAIL username
            $mail->Password = $systemSetting->sySettingSmtpPassword(); // GMAIL password

            $mail->From = $systemSetting->sySettingSmtpUsername();
            $mail->FromName = $systemSetting->sySettingFromName();
            $mail->Subject = $subject;
            $mail->WordWrap = 50; // set word wrap

            $mail->MsgHTML($EmailMessage);
            $mail->AddAddress($Administrator->getAdminEmail(), $systemSetting->sySettingCompanyName());
            $mail->IsHTML(true); // send as HTML

            $mail->Send();
            return true;

        }