Inheritance diagram for ilFormatMail:
Collaboration diagram for ilFormatMail:Public Member Functions | |
| ilFormatMail ($a_user_id) | |
| Constructor setup an mail object. | |
| formatReplyMessage () | |
| format a reply message public | |
| formatReplySubject () | |
| format a reply subject public | |
| formatReplyRecipient () | |
| get reply recipient public | |
| formatForwardSubject () | |
| format a forward subject public | |
| appendSearchResult ($a_names, $a_type) | |
| append search result to recipient public | |
| formatLinebreakMessage ($a_message) | |
| format message according to linebreak option | |
| appendSignature () | |
| append signature to mail body public | |
Definition at line 37 of file class.ilFormatMail.php.
| ilFormatMail::appendSearchResult | ( | $ | a_names, | |
| $ | a_type | |||
| ) |
append search result to recipient public
| array | names to append | |
| string | rcp type ('to','cc','bc') |
Definition at line 123 of file class.ilFormatMail.php.
{
if(empty($this->mail_data))
{
return false;
}
$name_str = implode(',',$a_names);
switch($a_type)
{
case 'to':
$this->mail_data["rcp_to"] = trim($this->mail_data["rcp_to"]);
if($this->mail_data["rcp_to"])
{
$this->mail_data["rcp_to"] = $this->mail_data["rcp_to"].",";
}
$this->mail_data["rcp_to"] = $this->mail_data["rcp_to"] . $name_str;
break;
case 'cc':
$this->mail_data["rcp_cc"] = trim($this->mail_data["rcp_cc"]);
if($this->mail_data["rcp_cc"])
{
$this->mail_data["rcp_cc"] = $this->mail_data["rcp_cc"].",";
}
$this->mail_data["rcp_cc"] = $this->mail_data["rcp_cc"] . $name_str;
break;
case 'bc':
$this->mail_data["rcp_bcc"] = trim($this->mail_data["rcp_bcc"]);
if($this->mail_data["rcp_bcc"])
{
$this->mail_data["rcp_bcc"] = $this->mail_data["rcp_bcc"].",";
}
$this->mail_data["rcp_bcc"] = $this->mail_data["rcp_bcc"] . $name_str;
break;
}
return $this->mail_data;
}
| ilFormatMail::appendSignature | ( | ) |
append signature to mail body public
Definition at line 199 of file class.ilFormatMail.php.
{
return $this->mail_data["m_message"] .= $this->mail_options->getSignature();
}
| ilFormatMail::formatForwardSubject | ( | ) |
format a forward subject public
Definition at line 107 of file class.ilFormatMail.php.
{
if(empty($this->mail_data))
{
return false;
}
return $this->mail_data["m_subject"] = "[FWD: ".$this->mail_data["m_subject"]."]";
}
| ilFormatMail::formatLinebreakMessage | ( | $ | a_message | ) |
format message according to linebreak option
| string | message public |
Definition at line 168 of file class.ilFormatMail.php.
{
$formatted = array();
# debug($a_message);
$linebreak = $this->mail_options->getLinebreak();
// SPLIT INTO LINES returns always an array
$lines = explode(chr(13).chr(10),$a_message);
for($i=0;$i<count($lines);$i++)
{
if(substr($lines[$i],0,1) != '>')
{
$formatted[] = wordwrap($lines[$i],$linebreak,chr(13).chr(10));
}
else
{
$formatted[] = $lines[$i];
}
}
$formatted = implode(chr(13).chr(10),$formatted);
# debug($formatted);
return $formatted;
}
| ilFormatMail::formatReplyMessage | ( | ) |
format a reply message public
Definition at line 56 of file class.ilFormatMail.php.
{
if(empty($this->mail_data))
{
return false;
}
# debug($this->mail_data["m_message"]);
$bodylines = explode(chr(13).chr(10), $this->mail_data["m_message"]);
# var_dump("<pre>",$bodylines,"</pre");
for ($i = 0; $i < count($bodylines); $i++)
{
$bodylines[$i] = "> ".$bodylines[$i];
}
return $this->mail_data["m_message"] = implode(chr(13).chr(10), $bodylines);
}
| ilFormatMail::formatReplyRecipient | ( | ) |
get reply recipient public
Definition at line 90 of file class.ilFormatMail.php.
References $user.
| ilFormatMail::formatReplySubject | ( | ) |
format a reply subject public
Definition at line 77 of file class.ilFormatMail.php.
{
if(empty($this->mail_data))
{
return false;
}
return $this->mail_data["m_subject"] = "RE: ".$this->mail_data["m_subject"];
}
| ilFormatMail::ilFormatMail | ( | $ | a_user_id | ) |
Constructor setup an mail object.
| int | user_id public |
Definition at line 46 of file class.ilFormatMail.php.
References ilMail::ilMail().
{
parent::ilMail($a_user_id);
}
Here is the call graph for this function:
1.7.1