vaefremov95 commented on PR #60963:
URL: https://github.com/apache/airflow/pull/60963#issuecomment-3899479867

   @shahar1 
   HI!
   I have tested new feature **max_mails** with my test Airflow Deployment 
(Airflow==2.11. Python 3.12.3).
   I used my company's production IMAP server and real-case scenario. I have 3 
emails returned by filter, each with 2 attachments, but I needed to retrieve 
only last mail.
   I tested methods _has_mail_attachment_, _retrieve_mail_attachments_, and 
_download_mail_attachments_ with different settings for max_mails.
   Here are some logs:
   ```
   [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - attachemnts found 
with max_mails: True
   [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - count attachments 
without max_mails: 6
   [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - count attachments 
with max_mails=1: 2
   [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - count attachments 
with max_mails=1 and latest_only: 1
   [2026-02-13, 20:50:38 UTC] {logging_mixin.py:190} INFO - downloaded 
attachments without max_mails: 4
   [2026-02-13, 20:50:39 UTC] {logging_mixin.py:190} INFO - downloaded 
attachments with max_mails=1: 2
   [2026-02-13, 20:50:40 UTC] {logging_mixin.py:190} INFO - downloaded 
attachments with max_mails=1 and latest_only: 1
   ```
   
   Everything works as expected, exept one detail. Since some files have same 
names, _download_mail_attachments_  method overwrites them. So instead of 6 
files I get 4. But I guess this is topic for another issue).
   
   Please let me know if this is sufficient testing. Also, should I write the 
results in your testing providers 
[issue](https://github.com/apache/airflow/issues/61766)?
   Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to