Solved: Sending email via O365 SMTP starttls nogo

::Update, changed to just tls again and ran optimize (done this a million times but it is what it is) and Email worked. I have read that this will work sometimes for a short time so I’ll let it sit overnight and try again in the AM. If this is the case, I’ll just make another cron to optimize every few mins if there are no adverse side effects.

Been reading a ton of threads on email issues. Finally was able to get the test email to send.
Had to enable basic auth on my O365 tenant for this one user.
Ended up getting the test to work. Made a test invoice, can not send. Errors do not report in the gui for the clients. Connected to the sql and was able to see the following. No luck with tls either. Any ideas?

Connection could not be established with host smtp.office365.com 
:stream_socket_client(): unable to connect to starttls:\/\/smtp.office365.com:587
 (Unable to find the socket transport "starttls" - 
did you forget to enable it when you configured PHP?
APP_URL=https://invoice.vipit.tech/
APP_KEY=base64:
APP_DEBUG=true
MULTI_DB_ENABLED=false
DB_HOST1=db
DB_PORT1=3306
DB_USERNAME1=
DB_PASSWORD1=
DB_DATABASE1=
MYSQL_ROOT_PASSWORD=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=
MAIL_MAILER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME='finance@vipit.tech'
MAIL_PASSWORD='xxx'
MAIL_ENCRYPTION='starttls'
MAIL_FROM_NAME='Finance VIP IT'
MAIL_FROM_ADDRESS='finance@vipit.tech'
QUEUE_CONNECTION=sync
#this is a system variable please do not remove
IS_DOCKER=true

PHANTOMJS_PDF_GENERATION=false

#V4 env vars
DB_STRICT=false
DB_HOST=db
DB_DATABASE=ninja
DB_USERNAME=ninja
DB_PASSWORD=ninja
APP_CIPHER=AES-256-CBC
1 Like