mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-29 20:00:53 +00:00
524 lines
26 KiB
HTML
524 lines
26 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<title>Ryzom Account Management System: Mail_Handler Class Reference</title>
|
|
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div! -->
|
|
|
|
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
|
|
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
|
|
|
|
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">Ryzom Account Management System
|
|
 <span id="projectnumber">1.0</span>
|
|
</div>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Generated by Doxygen 1.7.6.1 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Data Fields</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pub-static-methods">Static Public Member Functions</a> |
|
|
<a href="#pri-methods">Private Member Functions</a> |
|
|
<a href="#pri-attribs">Private Attributes</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">Mail_Handler Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<!-- doxytag: class="Mail_Handler" -->
|
|
<p>Handles the mailing functionality.
|
|
<a href="classMail__Handler.html#details">More...</a></p>
|
|
<table class="memberdecls">
|
|
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a1b65890aa4eb8c0c6129c3e787a53405">cron</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">the cron funtion (workhorse of the mailing system). <a href="#a1b65890aa4eb8c0c6129c3e787a53405"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a667ca75b6c659157d855c3d19978a436">new_message_id</a> ($ticketId)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">creates a new message id for a email about to send. <a href="#a667ca75b6c659157d855c3d19978a436"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a8604569b1e012ea3b1fe466018f75ce2">get_ticket_id_from_subject</a> ($subject)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">try to fetch the ticket_id out of the subject. <a href="#a8604569b1e012ea3b1fe466018f75ce2"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a2896dabadb8e435de7ba7bbb258f8a96">incoming_mail_handler</a> ($mbox, $i, $group)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Handles an incomming email Read the content of one email by using imap's functionality. <a href="#a2896dabadb8e435de7ba7bbb258f8a96"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a6fc5947eaa45b0724f8720b374481275">decode_utf8</a> ($str)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">decode utf8 <a href="#a6fc5947eaa45b0724f8720b374481275"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a719c5051ef00fbb0d7c7ce2c78e3b4e1">get_mime_type</a> (&$structure)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the mime type of a structure of a email <a href="#a719c5051ef00fbb0d7c7ce2c78e3b4e1"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#ab3a5e8f69692826c6dae96f873859642">get_part</a> ($stream, $msg_number, $mime_type, $structure=false, $part_number=false)</td></tr>
|
|
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
|
|
Static Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#abe649044c8b8bd8eb05787a401865e6d">send_ticketing_mail</a> ($receiver, $ticketObj, $content, $type, $sender=0)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Wrapper for sending emails, creates the content of the email Based on the type of the ticketing mail it will create a specific email, it will use the language.ini files to load the correct language of the email for the receiver. <a href="#abe649044c8b8bd8eb05787a401865e6d"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a50308ad0711aee080dacef7e3f574699">send_mail</a> ($recipient, $subject, $body, $ticket_id=0, $from=NULL)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">send mail function that will add the email to the db. <a href="#a50308ad0711aee080dacef7e3f574699"></a><br/></td></tr>
|
|
<tr><td colspan="2"><h2><a name="pri-methods"></a>
|
|
Private Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#ac6f9bcfab65cc93fdd4723284fff6b7a">mail_fork</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Start a new child process and return the process id this is used because imap might take some time, we dont want the cron parent process waiting on that. <a href="#ac6f9bcfab65cc93fdd4723284fff6b7a"></a><br/></td></tr>
|
|
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
|
|
Private Attributes</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMail__Handler.html#a1fa3127fc82f96b1436d871ef02be319">$db</a></td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">db object used by various methods. <a href="#a1fa3127fc82f96b1436d871ef02be319"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
|
<div class="textblock"><p>Handles the mailing functionality. </p>
|
|
<p>This class covers the reading of the mail boxes of the support_groups, handling those emails, updating tickets accoring to the content & title of the emails, but also the sending of emails after creating a new ticket and when someone else replies on your ticket. </p>
|
|
<dl class="author"><dt><b>Author:</b></dt><dd>Daan Janssens, mentored by Matthew Lagoe </dd></dl>
|
|
</div><hr/><h2>Member Function Documentation</h2>
|
|
<a class="anchor" id="a1b65890aa4eb8c0c6129c3e787a53405"></a><!-- doxytag: member="Mail_Handler::cron" ref="a1b65890aa4eb8c0c6129c3e787a53405" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#a1b65890aa4eb8c0c6129c3e787a53405">cron</a> </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>the cron funtion (workhorse of the mailing system). </p>
|
|
<p>The cron job will create a child process, which will first send the emails that are in the email table in the database, we use some kind of semaphore (a temp file) to make sure that if the cron job is called multiple times, it wont email those mails multiple times. After this, we will read the mail inboxes of the support groups and the default group using IMAP and we will add new tickets or new replies according to the incoming emails. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a6fc5947eaa45b0724f8720b374481275"></a><!-- doxytag: member="Mail_Handler::decode_utf8" ref="a6fc5947eaa45b0724f8720b374481275" args="($str)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#a6fc5947eaa45b0724f8720b374481275">decode_utf8</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>str</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>decode utf8 </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">$str</td><td>str to be decoded </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>decoded string </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a719c5051ef00fbb0d7c7ce2c78e3b4e1"></a><!-- doxytag: member="Mail_Handler::get_mime_type" ref="a719c5051ef00fbb0d7c7ce2c78e3b4e1" args="(&$structure)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#a719c5051ef00fbb0d7c7ce2c78e3b4e1">get_mime_type</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">&$ </td>
|
|
<td class="paramname"><em>structure</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns the mime type of a structure of a email </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">&$structure</td><td>the structure of an email message. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>"TEXT", "MULTIPART","MESSAGE", "APPLICATION", "AUDIO","IMAGE", "VIDEO", "OTHER","TEXT/PLAIN" </dd></dl>
|
|
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>take care of the HTML part of incoming emails. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab3a5e8f69692826c6dae96f873859642"></a><!-- doxytag: member="Mail_Handler::get_part" ref="ab3a5e8f69692826c6dae96f873859642" args="($stream, $msg_number, $mime_type, $structure=false, $part_number=false)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#ab3a5e8f69692826c6dae96f873859642">get_part</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>stream</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>msg_number</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>mime_type</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>structure</em> = <code>false</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>part_number</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8604569b1e012ea3b1fe466018f75ce2"></a><!-- doxytag: member="Mail_Handler::get_ticket_id_from_subject" ref="a8604569b1e012ea3b1fe466018f75ce2" args="($subject)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#a8604569b1e012ea3b1fe466018f75ce2">get_ticket_id_from_subject</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>subject</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>try to fetch the ticket_id out of the subject. </p>
|
|
<p>The subject should have a substring of the form [<a class="el" href="classTicket.html" title="class that handles most ticket related functions.">Ticket</a> #ticket_id], where ticket_id should be the integer ID of the ticket. </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">$subject</td><td>the subject of an incomming email. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>if the ticket's id is succesfully parsed, it will return the ticket_id, else it returns 0. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2896dabadb8e435de7ba7bbb258f8a96"></a><!-- doxytag: member="Mail_Handler::incoming_mail_handler" ref="a2896dabadb8e435de7ba7bbb258f8a96" args="($mbox, $i, $group)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#a2896dabadb8e435de7ba7bbb258f8a96">incoming_mail_handler</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>mbox</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>i</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>group</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Handles an incomming email Read the content of one email by using imap's functionality. </p>
|
|
<p>If a ticket id is found inside the message_id or else in the subject line, then a reply will be added (if the email is not being sent from the authors email address it won't be added though and a warning will be sent to both parties). If no ticket id is found, then a new ticket will be created. </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">$mbox</td><td>a mailbox object </td></tr>
|
|
<tr><td class="paramname">$i</td><td>the email's id in the mailbox (integer) </td></tr>
|
|
<tr><td class="paramname">$group</td><td>the group object that owns the inbox. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>a string based on the found ticket i and timestamp (will be used to store a copy of the email locally) </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac6f9bcfab65cc93fdd4723284fff6b7a"></a><!-- doxytag: member="Mail_Handler::mail_fork" ref="ac6f9bcfab65cc93fdd4723284fff6b7a" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#ac6f9bcfab65cc93fdd4723284fff6b7a">mail_fork</a> </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td><code> [private]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Start a new child process and return the process id this is used because imap might take some time, we dont want the cron parent process waiting on that. </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>return the child process id </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a667ca75b6c659157d855c3d19978a436"></a><!-- doxytag: member="Mail_Handler::new_message_id" ref="a667ca75b6c659157d855c3d19978a436" args="($ticketId)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classMail__Handler.html#a667ca75b6c659157d855c3d19978a436">new_message_id</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>ticketId</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>creates a new message id for a email about to send. </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">$ticketId</td><td>the ticket id of the ticket that is mentioned in the email. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>returns a string, that consist out of some variable parts, a consistent part and the ticket_id. The ticket_id will be used lateron, if someone replies on the message, to see to which ticket the reply should be added. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a50308ad0711aee080dacef7e3f574699"></a><!-- doxytag: member="Mail_Handler::send_mail" ref="a50308ad0711aee080dacef7e3f574699" args="($recipient, $subject, $body, $ticket_id=0, $from=NULL)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="classMail__Handler.html#a50308ad0711aee080dacef7e3f574699">send_mail</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>recipient</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>subject</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>body</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>ticket_id</em> = <code>0</code>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>from</em> = <code>NULL</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>send mail function that will add the email to the db. </p>
|
|
<p>this function is being used by the <a class="el" href="classMail__Handler.html#abe649044c8b8bd8eb05787a401865e6d" title="Wrapper for sending emails, creates the content of the email Based on the type of the ticketing mail ...">send_ticketing_mail()</a> function. It adds the email as an entry to the `email` table in the database, which will be sent later on when we run the cron job. </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">$recipient</td><td>if integer, then it refers to the id of the user to whom we want to mail, if it's a string(email-address) then we will use that. </td></tr>
|
|
<tr><td class="paramname">$subject</td><td>the subject of the email </td></tr>
|
|
<tr><td class="paramname">$body</td><td>the body of the email </td></tr>
|
|
<tr><td class="paramname">$ticket_id</td><td>the id of the ticket </td></tr>
|
|
<tr><td class="paramname">$from</td><td>the sending support_group's id (NULL in case the default group is sending)) </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="abe649044c8b8bd8eb05787a401865e6d"></a><!-- doxytag: member="Mail_Handler::send_ticketing_mail" ref="abe649044c8b8bd8eb05787a401865e6d" args="($receiver, $ticketObj, $content, $type, $sender=0)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="classMail__Handler.html#abe649044c8b8bd8eb05787a401865e6d">send_ticketing_mail</a> </td>
|
|
<td>(</td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>receiver</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>ticketObj</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>content</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>type</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">$ </td>
|
|
<td class="paramname"><em>sender</em> = <code>0</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Wrapper for sending emails, creates the content of the email Based on the type of the ticketing mail it will create a specific email, it will use the language.ini files to load the correct language of the email for the receiver. </p>
|
|
<p>Also if the $TICKET_MAILING_SUPPORT is set to false or if the user's personal 'ReceiveMail' entry is set to false then no mail will be sent. </p>
|
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">$receiver</td><td>if integer, then it refers to the id of the user to whom we want to mail, if it's a string(email-address) then we will use that. </td></tr>
|
|
<tr><td class="paramname">$ticketObj</td><td>the ticket object itself, this is being used for including ticket related information into the email. </td></tr>
|
|
<tr><td class="paramname">$content</td><td>the content of a reply or new ticket </td></tr>
|
|
<tr><td class="paramname">$type</td><td>REPLY, NEW, WARNAUTHOR, WARNSENDER, WARNUNKNOWNSENDER </td></tr>
|
|
<tr><td class="paramname">$sender</td><td>(default = 0 (if it is not forwarded)) else use the id of the support group to which the ticket is currently forwarded, the support groups email address will be used to send the ticket. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Field Documentation</h2>
|
|
<a class="anchor" id="a1fa3127fc82f96b1436d871ef02be319"></a><!-- doxytag: member="Mail_Handler::$db" ref="a1fa3127fc82f96b1436d871ef02be319" args="" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">$db<code> [private]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>db object used by various methods. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li>/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/<a class="el" href="mail__handler_8php.html">mail_handler.php</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
|
|
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sun Sep 15 2013 17:49:37 for Ryzom Account Management System by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.7.6.1
|
|
</small></address>
|
|
|
|
</body>
|
|
</html>
|