ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old November 9th, 2004, 01:11 PM
wdn2000's Avatar
wdn2000 wdn2000 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2000
Posts: 1,058 wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 6 Days 20 h 56 m 43 sec
Reputation Power: 16
Trouble Getting Email UID

I'm working on an automated email processing script and once the mail has been dealt with I need to delete it.

I know I need to use the UID, however getting it is proving to be a little tricky.

When I do a dump of the "pop" variable scope I see the UIDs. When I try to programmatically add them to an array so I can loop through them for deletion my array is populated with emptiness. That is, the array has a number of elements equal to the number of emails in the box, but they have no value.

Here's a bit of code:
Code:
<cfset uid_arr = arrayNew(1)>
<cfloop query="pop">
    <cfset arrayAppend(uid_arr, pop.UID)>
</cfloop>

<cfoutput>#arrayToList(uid_arr)#</cfoutput>


On the line:
Code:
<cfset arrayAppend(uid_arr, pop.UID)>

I've tried lots of different ways of trying to get the array to except the value, all to no avail.

Any ideas or suggestions appreciated.

Reply With Quote
  #2  
Old November 9th, 2004, 02:02 PM
bocmaxima's Avatar
bocmaxima bocmaxima is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2004
Location: Tucson, Sonora
Posts: 1,316 bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level)bocmaxima User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 16 h 48 m 13 sec
Reputation Power: 22
Send a message via AIM to bocmaxima
Quote:
Originally Posted by wdn2000
I've tried lots of different ways of trying to get the array to except the value, all to no avail.

Have you tried this?
Code:
<cfset uid_arr = arrayNew(1)>
<cfloop query="pop">
    <cfset uid_arr = arrayAppend(uid_arr, pop.UID)>
</cfloop>

Dealing with CF is like a battle between good and evil sometimes, I feel.

Reply With Quote
  #3  
Old November 9th, 2004, 02:22 PM
wdn2000's Avatar
wdn2000 wdn2000 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2000
Posts: 1,058 wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 6 Days 20 h 56 m 43 sec
Reputation Power: 16
Yep, that throws a Boolean cannot be used as an array. Maybe I need to use:
Code:
<cfset uid_arr[i] = appendArray(uid_arr, pop.UID)>

And then control the incrementing myself.

But on the other hand, I'm not sure there's anything wrong with how I'm adding to the array to begin with. When I just try to cfoutput pop.UID it comes out blank.

Reply With Quote
  #4  
Old November 9th, 2004, 02:28 PM
wdn2000's Avatar
wdn2000 wdn2000 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2000
Posts: 1,058 wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 6 Days 20 h 56 m 43 sec
Reputation Power: 16
OK, just to add to the fun....

When I send emails to the test address and do a dump of the values, I see a UID for each email.

Up until now I had been using my company email account for testing and I couldn't get the UID into the array. I just tried sending from my Yahoo account and lo and behold, the UID is in the dump and the array!

What does this mean? All of the email this thing will get in production is going to come from inhouse so I have to make it work with internal email.

Last edited by wdn2000 : November 10th, 2004 at 01:05 PM.

Reply With Quote
  #5  
Old November 10th, 2004, 01:07 PM
wdn2000's Avatar
wdn2000 wdn2000 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2000
Posts: 1,058 wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 6 Days 20 h 56 m 43 sec
Reputation Power: 16
No takers, huh?

Ok, I decided to use the MESSAGENUMBER instead of the UID. I've heard there are drawbacks to this approach but at least I can get the MESSAGENUMBER whereas the UID wasn't working so well.

Now, using the MESSAGENUMBER, when I try to delete a message nothing happens. By that, I mean the code executes, no errors are thrown, but the messages remain in the inbox.

Any ideas?

Reply With Quote
  #6  
Old November 14th, 2004, 09:20 AM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
Quote:
Originally Posted by wdn2000
Yep, that throws a Boolean cannot be used as an array. Maybe I need to use:
Code:
<cfset uid_arr[i] = appendArray(uid_arr, pop.UID)>

And then control the incrementing myself.

But on the other hand, I'm not sure there's anything wrong with how I'm adding to the array to begin with. When I just try to cfoutput pop.UID it comes out blank.


The problem is a simple one, you don't assign the arrayAppend() function to the array. The function itself returns a boolean true or false to show whether the variable was appended to the array. You just do this:

<cfset arrayAppend( uid_arr, pop.UID ) />
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #7  
Old November 14th, 2004, 07:04 PM
wdn2000's Avatar
wdn2000 wdn2000 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Apr 2000
Posts: 1,058 wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level)wdn2000 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 6 Days 20 h 56 m 43 sec
Reputation Power: 16
Quote:
Originally Posted by kiteless
The problem is a simple one, you don't assign the arrayAppend() function to the array. The function itself returns a boolean true or false to show whether the variable was appended to the array. You just do this:

<cfset arrayAppend( uid_arr, pop.UID ) />


Yup, that's how I was doing it. I only put it the other way to show it didn't work.

Strangely enough when I get the messages from a *NIX POP server everything works as it should, however in production it has to get it from a Lotus Notes server running on Windows. The problems seem to have to do with how Lotus implements the POP standard.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Trouble Getting Email UID


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway