login about faq

Hello,

I have the following function,according to the example published in chilckat:


Public Function recibir_correo() As EmailBundle

    Dim mailman As New MailMan

    'Liberaremos la libreria.

    If Not validar(mailman) Then

        Throw New Exception("DLL ChilkatDoNet2 no disponible")

    End If
    'Configuraremos el servidor segun los datos configurados en la bdd.

    mailman = servidor(mailman)

    'Cargamos la lista de correos ya leidos.

    Dim saSeenUidls As New Chilkat.StringArray()

    If (saSeenUidls.LoadFromFile(Application.StartupPath & "\Resources\seenUidls.txt") <> True)

Then

        Throw New Exception("Error al cargar registros de correos.(No existe el archivo

seenUidls.txt en la carpeta de instalacion Resources)")

    End If

    'Cargamos una lista de los correos en el servidor.

    Dim saUidls As Chilkat.StringArray

    saUidls = mailman.GetUidls()

    If (saUidls Is Nothing) Then

        Throw New Exception(mailman.LastErrorText)

    End If

    'Comparamos si existen correos sin leer en el servidor y solo rescatamos estos.

    Dim saUnseenUidls As New Chilkat.StringArray()

    Dim i As Integer

    Dim n As Integer

    n = saUidls.Count

    For i = 0 To n - 1

        If (saSeenUidls.Contains(saUidls.GetString(i)) <> True) Then

            saUnseenUidls.Append(saUidls.GetString(i))

        End If

    Next

    If (saUnseenUidls.Count = 0) Then

        Throw New Exception("No hay correos sin leer en el servidor")

    End If

    Dim bundle As EmailBundle

    'llenar el lote de correos.

    bundle = mailman.FetchMultiple(saUnseenUidls)

    If (bundle Is Nothing) Then

        Throw New Exception(mailman.LastErrorText)

    End If

    'Guardaremos la lista de correos leidos.

    saUidls.SaveToFile(Application.StartupPath & "\Resources\seenUidls.txt")

    Return bundle

    End Function

but all mail is not returned in the server (uid),of 900 emails are only returned 825 UID, any idea why this happens?

asked May 19 '14 at 12:35

JanRoman's gravatar image

JanRoman
16225

edited May 19 '14 at 12:38


After calling GetUidls, examine the mailman.LastErrorText and the mailman.Pop3SessionLog properties. You can see exactly the UIDLs in the POP3 Inbox. For example:

**** Connected to mail.something.com:995
< +OK POP3
> USER abc123
< +OK Send your password
> PASS ****
< +OK Mailbox locked and ready
> UIDL
< +OK 290 messages (23556033 octets)
< 1 61048
2 61065
3 61119
4 61140
5 61156
6 61222
7 61242
8 61329
9 61334
10 61435
11 61528
12 61529
13 61539
14 61547
15 61565
16 61574
17 61722
18 61781
19 61826
20 61834
21 61881
22 61923
23 62012
24 62016
25 62028
26 62050
27 62064
28 62067
29 62107
30 62154
31 62194
32 62202
33 62242
34 62424
35 62566
36 62578
37 62580
38 62632
39 62714
40 62733
41 62848
42 62892
43 63068
44 63079
45 63151
46 63153
47 63224
48 63367
49 63580
50 63633
51 63635
52 63715
53 63746
54 64032
55 64040
56 64042
57 64046
58 64083
59 64091
60 64273
61 64276
62 64292
63 64309
64 64423
65 64429
66 64563
67 64620
68 64651
69 64652
70 64655
71 64663
72 64691
73 64711
74 64892
75 64913
76 64981
77 65012
78 65104
79 65184
80 65199
81 65206
82 65212
83 65229
84 65577
85 65578
86 65649
87 65662
88 65701
89 65773
90 65778
91 65838
92 65842
93 65893
94 65921
95 65926
96 65929
97 65931
98 66048
99 66060
100 66066
101 66070
102 66074
103 66095
104 66121
105 66195
106 66201
107 66218
108 66219
109 66220
110 66222
111 66226
112 66231
113 66236
114 66281
115 66389
116 66431
117 66526
118 66527
119 66651
120 66711
121 66780
122 66901
123 66970
124 67069
125 67238
126 67318
127 67331
128 67355
129 67367
130 67370
131 67487
132 67539
133 67558
134 67577
135 67578
136 67581
137 67582
138 67596
139 67602
140 67605
141 67658
142 67659
143 67661
144 67666
145 67675
146 67723
147 67749
148 67776
149 67817
150 67832
151 67856
152 67857
153 67915
154 67955
155 68049
156 68092
157 68105
158 68209
159 68241
160 68308
161 68371
162 68527
163 68581
164 68612
165 68635
166 68719
167 68756
168 68931
169 68958
170 68959
171 69015
172 69021
173 69140
174 69196
175 69197
176 69205
177 69276
178 69312
179 69375
180 69415
181 69496
182 69606
183 69653
184 69657
185 69664
186 69681
187 69684
188 69685
189 69687
190 69695
191 69700
192 69701
193 69702
194 69703
195 69705
196 69708
197 69710
198 69711
199 69715
200 69720
201 69724
202 69726
203 69728
204 69732
205 69734
206 69740
207 69743
208 69744
209 69748
210 69755
211 69761
212 69764
213 69770
214 69774
215 69776
216 69785
217 69788
218 69789
219 69790
220 69791
221 69792
222 69793
223 69794
224 69795
225 69796
226 69797
227 69798
228 69799
229 69800
230 69801
231 69802
232 69803
233 69804
234 69805
235 69806
236 69807
237 69808
238 69809
239 69810
240 69811
241 69812
242 69813
243 69814
244 69815
245 69816
246 69817
247 69818
248 69819
249 69820
250 69821
251 69822
252 69823
253 69824
254 69825
255 69826
256 69827
257 69828
258 69829
259 69830
260 69831
261 69832
262 69833
263 69834
264 69835
265 69836
266 69837
267 69838
268 69839
269 69840
270 69841
271 69842
272 69843
273 69844
274 69845
275 69846
276 69847
277 69848
278 69849
279 69850
280 69851
281 69852
282 69853
283 69854
284 69855
285 69856
286 69857
287 69858
288 69859
289 69860
290 69861
.
link

answered May 20 '14 at 08:38

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×60
×5

Asked: May 19 '14 at 12:35

Seen: 4,297 times

Last updated: May 20 '14 at 08:38

powered by OSQA