Ask, reply and learn. Join the community of Akaunting.
Working config of SMTP with Zoho mail
I've just implemented Akaunting on Prem, and everything worked smoothly except SMTP config where I couldn't find any useful discussions/tutorials to explain the process/issues. I've now got it working and I'm sharing my findings to hopefully save someone else this painful process.
The version this was installed on is V 3.1.1.7
First of all your chosen mail provider needs to support either SSL or TLS SMTP conections, as Akaunting doesn't appear to support OAUTH2. I use Zoho successfully to send/receive emails for other websites so this was my choice.
In Akaunting, go settings->email service to set up the email:
Protocol = SMTP
SMTP HOST = smtppro.zoho.eu
SMTP PORT = 465
SMTP USERNAME = [email protected] (i.e. the email account you set up)
SMTP PASSWORD = your_password
SMTP SECURITY = ssl
Save these values, restart the webserver (or reboot) and test.
The next problem is there is no way to send a test email. Either use the forgotten password link (for an existing account) or create an invoice and try to mail it to a customer (i.e. yourself).
At this stage nothing worked for me. No email was received and no error message was given.
After some digging...
The values for the SMTP config are stored in the .env file, but some values were missing and the password was wrong. Manually corrrect this:
MAIL_MAILER="smtp"
MAIL_HOST="smtppro.zoho.eu"
MAIL_PORT="465"
MAIL_USERNAME="[email protected]"
MAIL_PASSWORD="yourpassword"
MAIL_ENCRYPTION="ssl"
MAIL_FROM_NAME="Your name" (who the end user will see who the email is from)
MAIL_FROM_ADDRESS="[email protected]"
In my install, the password the password Akaunting wrote to the .env was wrong and MAIL_FROM_NAME & MAIL_FROM_ADDRESS were missing. Put all values between " ".
Also, ensure that the email address you have setup in the .env file matches the email address you have setup as your company email settings->company: email (my initial config was different and Zoho rejected it).
After this extra config, the mail works.
Don't chnage the SMTP settings via the webpage as it will likely break the setup.
I hope this helps someone out.
Hi Dave,
Thank you for sharing your experience.
I'm also self-hosting using Coolify (an open-source alternative to Heroku), and I encountered exactly the same issues when deploying Akaunting. I’ve tried everything you mentioned, but unfortunately none of them worked for me either. I also attempted to configure it using Gmail SMTP, but still no success.
Thanks again!
I had the same problem when I installed Akaunting on premises Version 3.1.19 in multiple web hosting with MySQL and PostgreSQL.
When working with the support teams in these web hosts, they confirmed that the EHLO SMTP connection was always passing the localhost configuration instead of the server hostname where I have the email server.
Short change was to
1. Create a copy of the file Config/Mail.php
2. Edit the file Config/Mail.php
3. Update the line 'local_domain'
FROM: 'local_domain' => env('MAIL_EHLO_DOMAIN'),
TO: 'local_domain' => env('MAIL_EHLO_DOMAIN', 'enter your email server hostname or email server IP Address'),
4. Save the changes
5. optional: you might need to clear cache of the akaunting folder to remove any configuration that is saved using SSH command lines:
php artisan config:clear
php artisan cache:clear
This should allow to force the system to always send emails from your default email server hostname. I believe this value can be entered in the database (MySQL or PostgreSQL, but I did not test that yet as I needed to allow send invoices properly to all customers I have)
Hope this helps!
NB: Always save a copy of the updated file. If the changes do not work, you can always revert.
Always take a backup copy of the Akaunting files before updating too as these changed files might revert to the original state
Showing 1 to 4 of 4 discussions