1 Reply Latest reply on Oct 23, 2006 11:13 PM by Srinivas VK

    cfpop..anyone try this yet?

    Level 7
      I created a web site that people can send pics to from their cell phones. I
      created a specific email address for the user to send pics to and am using
      cfpop to capture the email, parse it, and insert 3 elements into a database
      (attachment, subject, and 'mobile member').

      The one problem I ran into with Verizon is that it sends a txt file and a
      image file at attachments. So, both get inserted into the database.
      Sprint is a pain due to having to link to their site to retrieve the image.

      Is there any way to strip out the image file in the attachment by either
      specifying the mine type or by looking for .jpg and going backwards till the
      first space and trimming the rest off?

      Also, how can I automate the cfpop to check for mail every so often? I have
      it set to trigger when a user hits the homepage.

      <cffunction name="GetMail" access="remote" returntype="void">
      <cfpop server="mail.mywebsite.com" username="mobile@mywebsite.com"
      password="****" action="GetAll"
      attachmentpath="E:\webs\mywebsite.com\wwwroot\gallery\pics" name="Mobile"
      generateuniquefilenames="yes">
      <cfif #Mobile.RecordCount# NEQ 0>
      <cfquery name="GetPic" datasource="#Request.MainDSN#">
      INSERT INTO Gallery (image, location, username)
      VALUES ('#Mobile.attachments#','#Mobile.subject#', 'Mobile Member')
      </cfquery>
      </cfif>
      </cffunction>

      --
      Wally Kolcz
      Developer / Support