Email.settings to enable email configuration

Hi…

I had done.self hosting installation …I had created couple of users and configure their email id…They are not getting email to enable their account…In settings -email setting i can only see option to attach pdf ,signature etc …No option to configure email servers like SMTP.gmail.com etc…Kindly advice where I can do that ? …Is any option to log in with out email id ? I mean user id and password?

Hi,

You can change the settings by editing the .env file in the root folder of the app

Ok…Any option to create user id and set password from admin login for users?

To request a change in the app please create a GitHub issue

Hi …Good day…i had configured below details on the .env file and run php artisan optimize

still i m not geting email…any cloue?

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xxxx@gmail.com
MAIL_PASSWORD=xxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=xxxx@gmail.com
MAIL_FROM_NAME=Admin

1 Like

Have you seen the info here:

https://invoiceninja.github.io/docs/self-host-troubleshooting/#email-not-sending

Yes i had refereed the document …still no luck…

here the steps i had done.

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xxx@gmail.com
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=xxx@gmail.com
MAIL_FROM_NAME=CF

QUEUE_CONNECTION=sync changed to QUEUE_CONNECTION=database

Cron

          • cd /home/xxx/public_html/invoice && php -d register_argc_argv=On artisan queue:work --stop-when-empty

Also tried

cd /home/xxx/public_html/invoice && php -d register_argc_argv=On artisan schedule:run >> /dev/null 2>&1

I m getting email notification from Cpanel as the cron is running

[2021-04-21 07:05:03][4] Processing: App\Listeners\User\UpdateUserLastLogin
[2021-04-21 07:05:03][4] Processed: App\Listeners\User\UpdateUserLastLogin
[2021-04-21 07:05:03][5] Processing: App\Listeners\User\CreatedUserActivity
[2021-04-21 07:05:03][5] Processed: App\Listeners\User\CreatedUserActivity
[2021-04-21 07:05:03][6] Processing: App\Listeners\SendVerificationNotification
[2021-04-21 07:05:03][6] Processed: App\Listeners\SendVerificationNotification
[2021-04-21 07:05:03][7] Processing: App\Jobs\Mail\NinjaMailerJob
[2021-04-21 07:05:07][7] Processed: App\Jobs\Mail\NinjaMailerJob

Still i m not getting email…i had checked spam folder as well…

I also configured different mail server of my hosted domain and still no luck…!!

no info in Larvel log and jobs table in DB

is any option in IN to sent test email to check the configuration…? I had created a new user and wait for the activation email to test.!

@david do you have any ideas?

Any option to send test email from application other than creating new user to with new email every time to test the email functionality?

Check the systems log tab in the dashboard for more info

U mean client - system log ?? There nothing I had check that already by referring one of your forum.

Any option to sent test email other than editing user email every time?

The system logs stab here should show errors if the mails are failing… If there is nothing in there, you may want to check the jobs table in the database, it should be empty.

David…i found the issue…no blame on IN… :O)…since i had used gmail …i have to enable allow less secure app on gmail security setting…that cause the issue…!! lol.

I’m having the same issue. Emails do not go out, neither do I see any errors in the storage/logs/laravel.log file.

I have tried updating the .env file as follows:

MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=587
MAIL_USERNAME=dummy@redacted.com
MAIL_PASSWORD=xxxxxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=dummy1@redacted.com
MAIL_FROM_NAME=TEST-ACCOUNT

I don’t see any errors, neither do emails go out. Any thoughts?

I have found the only way to cueck each change to the env file is to run the “php artisan optimize” in the app directory (self hosting) i also found the “activities” table in the database usefull to find out what was failing. For testing emails, found it easier to create 1 invoice and use the send email function to keep testing till it worked. Didnt get anything useful from the laravel logs.

Have you reviewed the info here, there may be useful info in the system logs

https://invoiceninja.github.io/docs/self-host-troubleshooting/#email-not-sending

Hey, do you have any more details on how to do this?