Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The input is not a valid email address. Use the basic format local-part@hostname #19037

Open
2 tasks done
jcervantes-sipecom opened this issue Feb 20, 2025 · 1 comment
Open
2 tasks done
Labels

Comments

@jcervantes-sipecom
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

10.0.17

Bug description

I'm getting the error: Uncaught Exception Laminas\Mail\Exception\InvalidArgumentException: The input is not a valid email address. Use the basic format local-part@hostname when the Collector Receiver try to read the mail in the mailbox.

I review the followings tickets: #13427, #12818, #10312, #9672, #8531, and I found out that when there is an email in TO or CC that isn't in correctly format, the collector failed to add the follow-up, but it shouldn't happen the collector should bypass the incorrect email and just add the valid ones.

I have this case:

Image

Image

And the error logs in the next section

Relevant log output

glpiphplog.CRITICAL:   *** Uncaught Exception Laminas\Mail\Exception\InvalidArgumentException: The input is not a valid email address. Use the basic format local-part@hostname in /glpi/vendor/laminas/laminas-mail/src/Address.php at line 79
  Backtrace :
  vendor/laminas/laminas-mail/src/Address.php:50     Laminas\Mail\Address->__construct()
  ...inas-mail/src/Header/AbstractAddressList.php:92 Laminas\Mail\Address::fromString()
  :                                                  Laminas\Mail\Header\AbstractAddressList::Laminas\Mail\Header\{closure}()
  ...inas-mail/src/Header/AbstractAddressList.php:70 array_map()
  vendor/laminas/laminas-mail/src/Headers.php:556    Laminas\Mail\Header\AbstractAddressList::fromString()
  vendor/laminas/laminas-mail/src/Headers.php:282    Laminas\Mail\Headers->loadHeader()
  vendor/laminas/laminas-mail/src/Headers.php:102    Laminas\Mail\Headers->addHeaderLine()
  vendor/laminas/laminas-mime/src/Decode.php:162     Laminas\Mail\Headers::fromString()
  ...r/laminas/laminas-mail/src/Storage/Part.php:106 Laminas\Mime\Decode::splitMessage()
  ...laminas/laminas-mail/src/Storage/Message.php:47 Laminas\Mail\Storage\Part->__construct()
  ...r/laminas/laminas-mail/src/Storage/Imap.php:121 Laminas\Mail\Storage\Message->__construct()
  ...aminas-mail/src/Storage/AbstractStorage.php:270 Laminas\Mail\Storage\Imap->getMessage()
  src/MailCollector.php:780                          Laminas\Mail\Storage\AbstractStorage->current()
  src/MailCollector.php:1929                         MailCollector->collect()
  src/CronTask.php:1027                              MailCollector::cronMailgate()
  front/cron.php:87                                  CronTask::launch()

Page URL

No response

Steps To reproduce

No response

Your GLPI setup information

No response

Anything else?

No response

@cedric-anne
Copy link
Member

I confirm the issue.

A patch similar to #12232 should be done to prevent this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants