Seems kinda dicey to down something from somewhere else.
Not to mention, I will need to updates this as errors present themselves...
Tried it...
cURL error 70 now...
Ugh
Made a typing error.
It now works.
Authentication occurred.
Token obtained. Token expires in 2 hours. Is this normal?
For future use:
Windows Server 2019
Webserver = IIs
PHP 8.0
Due to the Azure AD environment, I was receiving the above cURL error.
From the PHP website I found:
cURL error 60: SSL certificate problem: unable to get local issuer certificate
This problem can occur when developing locally on windows. I am using windows 10 (x64)
In order to fix the error, I downloaded cacert.pem from https://curl.haxx.se/docs/caextract.html
Set the following value for in php.ini
curl.cainfo = "C: \ php-8.0.7 \ extras \ ssl \ cacert.pem"
Which pertains to the IIs environment. Thank you leonlongoria!.
After some other goofiness and IT turning off "consent", I was able to set a token.
The email now appears to be working correctly.
Make sure to "enable" the the Remote Mailbox and the Outgoing (SMTP) once token is set...
Enjoy everyone.