Get all UID's from IMAP? - imap

Here is the problem
my gmail account displays that I have 373 emails.
However, when I query the IMAP server with is command
" SELECT INBOX\r\n"
it displays that I have about 968 emails in my inbox instead of 373.
So when I send the following command "UID SEARCH ALL\r\n" to return the UID's of the mails in my inbox, it returns a total of 355 UID's instead of 968 UID's.
Please what am I doing wrong?
What is the correct command to get the number of emails in my inbox? and how do I get all the UID's? I been searching for a good tutorial, the ones I got warent very practical.

Related

Figuring out userId from Twitter's Streaming Response Status

Per Twitter documentation A follow is:
https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters
A comma-separated list of user IDs, indicating the users whose Tweets
should be delivered on the stream. Following protected users is not
supported. For each user specified, the stream will contain:
1. Tweets created by the user.
2. Tweets which are retweeted by the user.
3. Replies to any Tweet created by the user.
4. Retweets of any Tweet created by the user.
5. Manual replies, created without pressing a reply button (e.g.
“#twitterapi I agree”).
....
......
1 and 2 are straight forward , to get them from Status JSON just do
status.getUser().getId()
for 3 , status.inReplyToUserId
for 4 , status.getRetweetedStatus().getUser().getId()
but how the heck do you get the last one ? Do those become mentions ?

What causes a "NO UID SEARCH State error"

I have a script that connects via TCP/Sockets, Authenticates SSL, and then checks if the response from stream returns "OK".
It then sends a UID search command:
{tag} UID SEARCH (UNDELETED) (SENTSINCE "{RFC2060 Format Date}")
I then follow that with another OK check aswell as a * SEARCH stream response check.
When both of those are not true, I always end up with this as a result from the stream: xm005 NO UID SEARCH State error
Im not certain but is it possible this returns if the email has no UNDELETED inbox or something?
This seems to occur all the time on one of my chinese friends specific accounts on yeah.net (163-China related email service).
When I login to it with Windows 10's Mail App, I can see it has inboxes in CHINESE. Is it possible something to do with that is causing this issue?
I'm essentially wanting to search for every email within the sent-since date that has not been deleted, perhaps (UNDELETED) isn't a global declaration and is an actual inbox or something?
According to IMAPv4.1's RFC:
UNDELETED
Messages that do not have the \Deleted flag set.
So maybe its not to do with Inbox's? regardless its pretty odd that both emails this occurs on have Chinese Inbox's yet my English-Only one works splendid.
I removed (UNDELETED) and attempted running, and the same issue occurs, so it's not that.
The "state" in the error message could mean "your state does not include a mailbox". Make sure to issue a SELECT command before UID SEARCH.

Mail Message total size limit in mvc

I'm using System.Net.Mail and MailMessage to put together emails with attachments and send using SmtpClint but I have a email limit of 19mb.
I have a simple form with a number of textboxes or dropdowns and 3 possible attachments, I tested adding a single 18mb attachment but got a mail undeliverable response saying that the message was 24mb large.
So far no matter what I search I can only find information about mail attachments rather than the mail message as a whole so if push comes to shove I'll just add some code to check each attachment size, add em up then make sure they're all under 14/15mb total.
Any ideas/suggestions/links would be much appreciated.

Duplicate Customers Returned in Quickbooks CustomerQueryRq

We have an application that is synchronizing Quickbook's customers with a remote SQL Server database. And, I am running into a bizarre issue with the QBXML CustomerQueryRs. I am using an iterator with varying slice count and the response XML intermittently returns the exact same customer 2 or more times.
I have verified that the customer is exactly the same (i.e. FullName and ListID) are identical. I have even run the query with a MaxReturned value of 1500 which is greater than the number of customers in the company file. Some customers are returned as many as 5 times in the QBXML response.
Below, is a copy of my last request using the large MaxReturned value. My response is huge so, I will not include it. But, the same CustomerRet element is returned more than one time for about 133 customers out of around 1400. Any suggestions?
** QBXML REQUEST **
<?xml version="1.0"?><?qbxml version="12.0"?><QBXML><QBXMLMsgsRq onError="stopOnError"><CustomerQueryRq metaData="MetaDataAndResponseData" iterator="Start"><MaxReturned>1500</MaxReturned><ActiveStatus>ActiveOnly</ActiveStatus></CustomerQueryRq></QBXMLMsgsRq></QBXML>
You are probably getting back different notes or one of the other fields is changing.
Go to c:\ProgramData\Intuit\QuickBooks and edit the qbsdk.ini file.
If qbsdk.ini is not there, just create it.
Add or modify the following lines:
[Parser]
SdkAccelerator=N

Are we able to search or fetch with HIGHESTMODSEQ In yahoo server?

Hi I tried following IMAP commands in Gmail, It is working where as in yahoo not working.
A UID FETCH *:* (UID) (MODSEQ)
A BAD [CLIENTBUG] UID FETCH Additional arguments found after last expected argument
In gmail i am getting MODSEQ as one of the response.
FYI:
In gmail CONDSTORE is one of available capability whereas in yahoo it is not. But still yahoo providing HIGHESTMODSEQ for every SELECT/EXAMINE. if it is maintaining HIGHESTMODSEQ then there is a way to get for per-message basis. please tell me how to archive this in Yahoo....
Thanks...
When the server tells you there's a CLIENTBUG, it is usually right. The syntax for FETCH is on page 85 of RFC 3501. Read it. In this case, the correct version is:
A UID FETCH *:* (UID MODSEQ)
You could also make the list simpler, since UID implies UID and *:* means "from * to *":
A UID FETCH * (MODSEQ)
Or turn the single-item list into a single item:
A UID FETCH * MODSEQ

Resources