Sending invoices via email does not work

Hi,
I cannot send an invoice via email. the .env looks like this:

> MAIL_MAILER=smtp
> MAIL_HOST=server.domain.de
> MAIL_PORT=587
> MAIL_USERNAME=email@domain.de
> MAIL_PASSWORD=xxxpassxxx
> MAIL_ENCRYPTION=starttls
> MAIL_FROM_ADDRESS=email@domain.de
> MAIL_FROM_NAME='Name'

I have already tested various possibilities … no email.
cache was cleared. still ideas?

Hi,

Maybe you need to activate your company, there would be a warning in the bottom left corner.

Also, check the queues are running.

How can i check if queues are running? I am having problems too.

I just checked, that if I run docker-compose exec app php artisan optimize, and right after I give it to send, it works without problems.

Also, I desactivate and reactivate the company.

You can check the database table jobs to see if any records are in there, if the queue is running it should be empty.

I have no entry in the “jobs” table. But in the table “system_logs” the following:
“Mailer [SMTP] is not defined.”
However, SMTO capitalized. I changed that during one of my attempts. now small again, there is no new entry in this table. But also no email…
Queue/Cronjob is running

how did you do this?

ok found it, no email

Are you still facing this problem?

yes, no idea what else to do

If you changed the .env file you may need to run php artisan optimize

done a thousand times :slight_smile:

What do you see in the system_logs table

since yesterday evening:

“Connection could not be established with host server.domain.de :stream_socket_client(): unable to connect to starttls://server.domain.de:587 (Unable to find the socket transport “starttls” - did you forget to enable it when you configured PHP?)”

In the .env file are you using starttls or tls?

starttls, but i also had tls, without success

What error do you see in the logs when using tls?

the same error relates to starttls

You see “Unable to find the socket transport “starttls”” when using tls?

I’m going crazy … yes, there is written “starttls”. now I wanted to look again, sent an email, now the mail arrived :slight_smile: :frowning:

Why i cant enable on docker config cached?
I run “docker-compose exec app php artisan optimize” and message always is advertising me.

I run my docker under root, all working except emails. Test mail working on setup page. And working too for a short time after run artisan optimize.