Have in mind that FROM WHICH DIRECTORY you run the “composer” command from is EXTREMELY important and can ruin your mautic installation.
You must position (cd) on the root path mautic folder or directory where the install is, meaning that if you use the “mautic” user on Debian 12 as example…:
/home/mautic/public_html
(mautic install dir)
and this is the apache public one:
/home/mautic/public_html/docroot
(mautic public pages, this is where you point the apache DocumentRoot both in the apache config file:
DocumentRoot /home/mautic/public_html/docroot
and
<Directory /home/mautic/public_html/docroot>).
In case you ran “composer” the command from the wrong directory, you can clean the worng install and try the new one:
cd /wrongdirectory
composer remove symfony/sendgrid-mailer
then go to the right one in my case:
cd /home/mautic/public_html
and run
composer require symfony/sendgrid-mailer
that will allow you to put “sendgrid+api” and the KEY as the official documentation.