Location: PHPKode > projects > Maian Support > maian_support/docs/imap_2.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" />
<title>Imap Functions: Maian Support v2.0 - Documentation</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/menu.js"></script>
<link href="menu.css" rel="stylesheet" type="text/css" />


<div id="header">
   <span class="dashboard">
   <a href="http://www.maiansupport.com/purchase.html" title="Purchase Full Version" style="color:#eaeaea" onclick="window.open(this);return false">Purchase Full Version</a> |
   <a href="http://www.maianscriptworld.co.uk/forum/viewforum.php?id=3" title="Support" onclick="window.open(this);return false">Support</a> |
   <a href="http://www.maianscriptworld.co.uk" title="Other Free Scripts">Other Free Scripts</a>
   <a href="index.html"><img src="images/logo.gif" alt="Maian Support v2.0 - Documentation" title="Maian Support v2.0 - Documentation" /></a>

<div id="wrapper">

<div id="menu">
 <script type="text/javascript" src="js/nav.js"></script>
  <p>Javascript Not Enabled..Menu will NOT load.</p>

<div class="homeWrapper">

  <div id="innerArea">
    <p class="head">What is E-Mail Piping?</p>
    <p class="info">
    E-Mail piping is the name for the technique of sending e-mail messages as an input to a program rather than appending the message to the mailbox file, 
    allowing for real-time e-mail delivery and handling. To put it simply, anyone sending an e-mail to a specified address will automatically have a ticket opened
    for them, just as if they visited the site and entered their details on the new ticket page. For this option Maian Support utilises the PHP imap functions. It does not support local piping via
    control panels.
    <p class="head">E-Mail Piping Setup</p>
    <p class="info">
    1. Create an e-mail address that will trigger opening support tickets. An example might be 'hide@address.com'. Note that you never need to access this
    mailbox manually, so setting it up in an e-mail program is not needed. For the best results, set the mailbox to read incoming mail as plain text and NOT html. You should also make sure you have virus and spam filtering on this mailbox. Ideally at
    the server level, so that very little spam reaches the mailbox. <a href="http://www.firetrust.com/products/mailwasher-enterprise-server" title="MWES" onclick="window.open(this);return false">Mailwasher Enterprise Server</a> is terrific.<br /><br />
    2. Log into your support admin and make sure that your support settings point to this mailbox.<br /><br />
    3. Using another of your e-mail accounts, send 2 or 3 messages to the new mailbox. But don`t read them in the new mailbox.<br /><br />
    4. Access the following url in your browser (replacing paths and domains where applicable):<br /><br />
    <b>http://www.yoursite.com/support/index.php?pipe=yes</b><br /><br />
    Note that the default is to show nothing on screen, so you may just see a white page. This is fine. If you want to have output, open the 'control/defined.inc.php' file
    and change the value of 'DISPLAY_IMAP_CRON_OUTPUT' to 1.<br /><br />
    If all is working you should see tickets in your admin area and have received e-mails about new tickets. It is recommended you set to delete messages from the mailbox
    after reading. Once you have confirmed the imap fetch is working, you`ll need to set up a crontab (or cronjob) to access this file on a scheduled basis. See below. If the fetch
    didn`t work, check your mail settings for the mailbox.<br /><br />
    For any e-mails received via this method, the system will attempt to identify existing tickets by the ticket number in the e-mail subject. If the subject is tampered
    with and the ticket number removed a new ticket will be opened. If this happens, use the merge option in your admin area.
    <p class="head">Setting up Cronjob/Crontab</p>
    <p class="info">
    Once you are sure the e-mail fetching is working ok, you should set up a scheduled task so it runs automatically. On Windows this would be via Scheduled Tasks, on Linux
    it would be a crontab or job. Ideally you`ll want to have this run pretty frequently in case tickets are started. Up to you.<br /><br />
    Commands for crontabs very from server to server. Here are a few that may work:<br /><br />
    <b>/usr/local/bin/php /home/admin/domains/yourdomain.co.uk/public_html/support/index.php?pipe=yes<br />
    php q /home/admin/domains/yourdomain.co.uk/public_html/support/index.php?pipe=yes<br />
    /usr/local/bin/php q /home/admin/domains/yourdomain.co.uk/public_html/support/index.php?pipe=yes<br />
    cmd /k C:\Windows\php\php.exe &quot;C:\website\support\index.php?pipe=yes&quot; (Windows)</b><br /><br />
    Contact your host if you aren`t sure.
    <p class="head">Piping Query String Security Change</p>
    <p class="info">
    The default query string is 'pipe' and is accessed as 'pipe=yes'. It is recommended you change this to another word when you go live to stop any abuse being
    aimed at this url. Open the 'control/defined.inc.php' file and update the value of 'IMAP_URL_PARAMETER'.<br /><br />
    Example:<br />
    define('IMAP_URL_PARAMETER', 'ayumi');<br /><br />
    <p class="head">Cron Trigger Override</p>
    <p class="info">
    If the system fails when you setup a cron, and ioncube returns an error saying the system is encoded for another domain, you can bypass the main index file via a trigger.<br /><br />
    1. Open the 'cron.php' file in a text editor. Enter your full cron path in the <b>CURLOPT_URL</b> value exactly as you are accessing in your browser. Example:<br /><br />
       <b>curl_setopt($ch, CURLOPT_URL, "http://www.yoursite.com/helpdesk/index.php?pipe=yes");</b><br /><br />
    2. Change your cron job in your control panel to access the 'cron.php' file instead of the index.php file. This will send a trigger to the main index.php file.<br /><br />
      <b>NOTE</b>: CURL must be installed for this to run.
    <p class="head">Remote Piping</p>
    <p class="info">
    Maian Support does not handle remote piping.


<div id="footer">
  <p class="copyright">
   <b>Powered by</b>: <a href="http://www.maiansupport.com" title="Maian Support v2.0" onclick="window.open(this);return false">Maian Support v2.0</a>
   &copy; 2005-<script type="text/javascript">var d = new Date(); document.write(d.getFullYear());</script> <a href="http://www.maianscriptworld.co.uk" onclick="window.open(this);return false" title="Maian Script World">Maian Script World</a>. All Rights Reserved  </p>

Return current item: Maian Support