Exemplo n.º 1
0
 /**
  * Define the subject line of the email
  * @param string subject any monoline string
  */
 function Subject($subject, $a_add_prefix = false)
 {
     if ($a_add_prefix) {
         // #9096
         include_once "Services/Mail/classes/class.ilMail.php";
         $prefix = ilMail::getSubjectPrefix();
         if (trim($prefix)) {
             $subject = trim($prefix) . " " . $subject;
         }
     }
     $this->xheaders['Subject'] = ilMimeMail::_mimeEncode(strtr($subject, "\r\n", " "));
 }
Exemplo n.º 2
0
 /**
  * 
  * Builds an email address used for system notifications 
  * 
  * @static
  * @access	public
  * @return	string
  * 
  */
 public static function getIliasMailerAddress()
 {
     global $ilSetting;
     include_once 'Services/Mail/classes/class.ilMimeMail.php';
     $no_reply_adress = trim($ilSetting->get('mail_external_sender_noreply'));
     if (strlen($no_reply_adress)) {
         if (strpos($no_reply_adress, '@') === false) {
             $no_reply_adress = 'noreply@' . $no_reply_adress;
         }
         if (!ilUtil::is_email($no_reply_adress)) {
             $no_reply_adress = 'noreply@' . $_SERVER['SERVER_NAME'];
         }
         $sender = ilMimeMail::_mimeEncode(self::_getIliasMailerName()) . ' <' . $no_reply_adress . '>';
     } else {
         $sender = ilMimeMail::_mimeEncode(self::_getIliasMailerName()) . ' <noreply@' . $_SERVER['SERVER_NAME'] . '>';
     }
     return $sender;
 }
 /**
  * Define the subject line of the email
  * @param string subject any monoline string
  */
 function Subject($subject)
 {
     $this->xheaders['Subject'] = ilMimeMail::_mimeEncode(strtr($subject, "\r\n", " "));
 }