barbushin / php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)
MIT License
1.65k stars 459 forks source link

[Feature Request] Add bool return to setFlag(), markMailAsRead(), etc. #706

Open loekvangool opened 1 year ago

loekvangool commented 1 year ago

Is your feature request related to a problem? Please describe. setFlag() and its invokers like markMailAsRead() return void at the moment, can they instead return a bool?

michalcharvat commented 1 year ago

Question is if it is necessary because when there is something wrong when you try set or clear the flag, you receive UnexpectedValueException

loekvangool commented 1 year ago

Thanks for the reply. Saw that, however writing try/catch blocks is IMO quite cumbersome to implement, versus return values.

I do understand that it is a style difference, not right/wrong.