Webklex / laravel-imap

Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app.
https://www.php-imap.com
MIT License
629 stars 179 forks source link

How to tell if email was send by autoresponder (autoreplay) ? #469

Closed dewelooper closed 1 year ago

dewelooper commented 1 year ago

Hello Guys, I have implemented this nice library for 4 years and working perfectly but I have huge problem with set email as auto replayed by autoresponder.

I found some info about : ->getHeaderLine('Auto-Submitted') or ->getHeaderLine('List-Unsubscribe')

but both show "null"

I dodnt want to parse email content because I have bad memories with this approach:/

How do you figured out this problem in you apps?

Thank you! K

Webklex commented 1 year ago

Hi @dewelooper, are you using the latest release?

If you do, you could use any of the following:

$message->auto_submitted;
$message->getAutoSubmitted();
$message->getHeader()->get("Auto-Submitted");

If it's not working and you are using the latest release, please consider donating an anonymized message, so I or someone else can write a test for it :)

Best regards & happy coding,