No announcement yet.

Intercepting Email

  • Filter
  • Time
  • Show
Clear All
new posts

  • Intercepting Email

    I am looking for the technique behind having a PHP script intercept an email sent to a given address. Basically, I'd like to set up an address such as [email protected] and have it automatically picked up by a support script, given a session number, and send a reply back to the user giving them a URL to check in for follow-up. Its pretty similar to the issues.php script that the vBulletin support guys are using if you send them an email.

    any ideas?
    David Risley

  • #2
    This is the second question asked today of something I just built for an intranet (for a help desk).

    For the script that sends the email, have it send two emails, one the recipient and one to the support email. Have the mail sent AFTER the insert query, so that you can get the ID field from the table (assuming you are using a database). Now for the link, you can get the ID for their query using the following method:

    $entryid = mysql_insert_id($queryvar);

    That'll give you the value of the auto_increment field of the query issued in the variable $queryvar.


    • #3
      i think drisley want something different whereby someone sends an email to a email address from their own computer etc and it picks it up ?? is that right?

      if that is so i thinnk you need to get PHP to log into the POP3 account every x minutes using cron and do it that way, if you want to do it by sending the email through a webform then krucifyx has the way to do it.