Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Cannot get email to work

Peter Wieland   ( User )

Commented 3 weeks ago

I'm totally new to this, although I have some limited DB/programming eperience.

I cannot get Akaunting to send emails. I am self-hosting (on Interserver), and I have tried my own emails on the same server and domain, as well as Gmail and nothing works.

I don't get any error messages just 'Invoice email has been sent', and there is nothing email related in the logs.

Is there an 'idiots' guide available anywhere?

I am on the verge of giving up on Akaunting, which is a shame, as it looks to be an otherwise excellent program.

Tyler Brown   ( User )

Commented 2 weeks ago

I use resend for smtp.

1. Simply create an account on resend.
2. Add your domain. (example.com, not subdomain.example.com)
3. Go to resend settings, then to SMTP
4. Use those credentials under the email service settings in Akaunting.
5. Ensure the email in your company settings is set to something like [email protected] (The same domain you added in resend)
6. Create a test invoice to send to yourself.

If you run into any errors you can check the logs on resend and throw that into ChatGPT or your favorite LLM and it will guide you in case I missed something.

[email protected] [email protected]   ( User )

Commented 4 days ago

1. Complete the setup settings in the akaunting profile. Settings >> Email Service >>
Protocol = SMTP
SMTP Host = confirm with your email host provider the hostname
SMTP Port = 465 (recommended and tested for me with multiple web hosting)
SMTP Username = it is usually the email address
SMTP Password = It is the email password
SMTP Security = SSL

After completing these steps, if you are having issues to send emails. you might need to force HELO /EHLO SMTP Configuration to force to your hostname server instead of localhost as filter spams are not allowing to send the email outside your hostname.

You can follow the steps before to test that. Make sure to always backup your files:

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'), //Here you will need to force the hostname of your email address in the second parameter.
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

Please login or register to leave a response.

Showing 1 to 3 of 3 discussions