• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfpop..anyone try this yet?

LEGEND ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

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


TOPICS
Advanced techniques

Views

227

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

LATEST
Hi

i think the best idea is by checking the mime type. you can stripe off the image attachment.
and to automate the checking the new mails you can make use of the scheduler.
create a scheduler and give some schedule time, then it will triggers on the specified time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation