# Test Email working, other emails do not

**URL:** <https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996>\
**Category:** Installation Issues\
**Created:** [June 12, 2021, 8:20pm UTC](https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996 "2021-06-12T20:20:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dustbro](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dustbro](https://community.passbolt.com/u/dustbro)\
**Post date:** [June 12, 2021, 8:20pm UTC](https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996/1 "2021-06-12T20:20:49Z")

</div>

This seems to be a common issue. I’ve read similar posts and followed their solutions, but I can’t get emails to work.  
Here’s what I’ve done so far:

- Installed via instructions from [linuxbabe.com](http://linuxbabe.com)  
[How to Install Passbolt Password Manager on Ubuntu 20.04 Server](https://www.linuxbabe.com/ubuntu/install-passbolt-password-manager-ubuntu-20-04)

- Couldn’t log in until I found a post about how to Enable mod\_rewrite for apache (I wish that was documented).

- Setup my account.

- Sent test email  
`sudo ./bin/cake passbolt send_test_email --recipient=mytestemail@yahoo.com`

- message sent successfully

```auto

     ______  ____
    / __\____  _________ / /_ ____ / / /_
   / /_/ / __`/___ / ___/__ \/ __\/ /__ /
  / ____/ /_/ (__ |__ ) /_/ / /_/ / / /
 /_/ \ __,_/____ / ____/_.___ /\ ____/_/\__ /

 Open source password manager for teams
-------------------------------------------------------------------------------
 Debug email shell
-------------------------------------------------------------------------------
Email configuration
-------------------------------------------------------------------------------
Host: my.mailhost.com
Port: 26
Username: my_email_account
Password: *********
TLS: true
Sending email from: Passbolt <my_email_account>
Sending email to: mytestemail@yahoo.com
-------------------------------------------------------------------------------
Trace
[220] my.mailhost.com ESMTP Exim 4.94.2 #2 Sat, 12 Jun 2021 19:45:11 +0000
[220] We do not authorize the use of this system to transport unsolicited,
[220] and/or bulk e-mail.
> EHLO localhost
[250] my.mailhost.com Hello my_internet_Provider.net [XX.XX.XXX.XXX]
[250] SIZE 52428800
[250] 8BITMIME
[250] PIPELINING
[250] PIPE_CONNECT
[250] AUTH PLAIN LOGIN
[250] STARTTLS
[250] HELP
> STARTTLS
[220] TLS go ahead
> EHLO localhost
[250] my.mailhost.com Hello my_internet_Provider.net [XX.XX.XXX.XXX]
[250] SIZE 52428800
[250] 8BITMIME
[250] PIPELINING
[250] PIPE_CONNECT
[250] AUTH PLAIN LOGIN
[250] HELP
> AUTH PLAIN AfsbkBrb3JusdfZmYXVkaW8uY29tAHZTYXtbTEBAbjgqeA==
[235] Authentication succeeded
> MAIL FROM:< ***** >
[250] OK
> RCPT TO:<mytestemail@yahoo.com>
[250] Accepted
> DATA
[354] Enter message, ending with "." on a line by itself
> From: Passbolt < ***** >
To: mytestemail@yahoo.com
Date: Sat, 12 Jun 2021 19:45:12 +0000
Message-ID: <6fb0fa26af37asdffd175f73a6e1f09c@passbolt>
Subject: Passbolt test email
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Congratulations!
If you receive this email, it means that your passbolt smtp configuration is working fine.

.
[250] OK id=1ls9ZA-0004A1-E3
> QUIT
The message has been successfully sent!

```

- after reading similar posts, I found that sendmail was not installed
- installed sendmail with default settings
- email still not sending.
- check cron and saw no cronjob was created
- made cronjob

```auto
crontab -u www-data -e

```

added to the bottom  
`* * * * * /var/www/passbolt/bin/cron >> /var/log/passbolt.log`

- cron.service log says:

```auto
pam_unix(cron:session): session opened for user www-data by (uid=0)
(www-data) CMD (/var/www/passbolt/bin/cron >> /var/log/passbolt.log)
pam_unix(cron:session): session closed for user www-data

```

- email still not sent
- run healthcheck  
`su -s /bin/bash -c "/var/www/passbolt/bin/cake passbolt healthcheck --application --configFiles --core --database --environment --ssl" www-data`

```auto

     ______  ____
    / __\____  _________ / /_ ____ / / /_
   / /_/ / __`/___ / ___/__ \/ __\/ /__ /
  / ____/ /_/ (__ |__ ) /_/ / /_/ / / /
 /_/ \ __,_/____ / ____/_.___ /\ ____/_/\__ /

 Open source password manager for teams
-------------------------------------------------------------------------------
 Healthcheck shell
-------------------------------------------------------------------------------

 Environment

 [PASS] PHP version 7.4.3.
 [PASS] PCRE compiled with unicode support.
 [PASS] The temporary directory and its content are writable.
 [PASS] The public image directory and its content are writable.
 [PASS] The logs directory and its content are writable.
 [PASS] GD or Imagick extension is installed.
 [PASS] Intl extension is installed.
 [PASS] Mbstring extension is installed.

 Config files

 [PASS] The application config file is present
 [PASS] The passbolt config file is present

 Core config

 [PASS] Debug mode is off.
 [PASS] Cache is working.
 [PASS] Unique value set for security.salt
 [PASS] Full base url is set to https://passbolt.mydomain.co
 [PASS] App.fullBaseUrl validation OK.
 [PASS] /healthcheck/status is reachable.

 SSL Certificate

 [PASS] SSL peer certificate validates
 [PASS] Hostname is matching in SSL certificate.
 [PASS] Not using a self-signed certificate

 Database

 [PASS] The application is able to connect to the database
 [PASS] 25 tables found
 [PASS] Some default content is present
 [PASS] The database schema up to date.

 Application configuration

 [PASS] Using latest passbolt version (3.2.1).
 [PASS] Passbolt is configured to force SSL use.
 [PASS] App.fullBaseUrl is set to HTTPS.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [PASS] Registration is closed, only administrators can add users.
 [PASS] Serving the compiled version of the javascript app
 [PASS] All email notifications will be sent.

 [PASS] No error found. Nice one sparky!

```

Here’s what my email configuration looks like:

```auto
// Email configuration.
    'EmailTransport' => [
        'default' => [
            'host' => 'my.mailhost.com',
            'port' => 26,
            'username' => 'my_email_account',
            'password' => 'xxxxxxx',
            // Is this a secure connection? true if yes, null if no.
            'tls' => true,
            //'timeout' => 30,
            //'client' => null,
            //'url' => null,
        ],
    ],
    'Email' => [
        'default' => [
            // Defines the default name and email of the sender of the emails.
            'from' => ['mytestemail@yahoo.com' => 'Passbolt'],
            //'charset' => 'utf-8',
            //'headerCharset' => 'utf-8',
        ],
    ],

```

All email notifications settings are turned on in Email Delivery.

Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [June 17, 2021, 11:16pm UTC](https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996/2 "2021-06-17T23:16:57Z")

</div>

Hi @dustbro

The linuxbabe tutorial is not the official one. The official one which it’s based on is the Install from Source Code option[found here](https://help.passbolt.com/hosting/install/ce/from-source.html) and it mentions mod\_rewrite in step 1.

You have stated the email is sent successfully when using the test script, but are you succesfully receiving the email as well?

Reason 6 [on this Email Troubleshooting page](https://help.passbolt.com/faq/hosting/why-email-not-sent) speaks about file permissions. Did you double check those?

If you are trying to send the email from your mail host, and attempting to log into the host server, port 26 is a very unusual port to use. It would normally be port 587 for SMTP.

---

<div class="post-metadata">

**Author:** ![dustbro](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dustbro](https://community.passbolt.com/u/dustbro)\
**Post date:** [June 18, 2021, 1:52am UTC](https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996/3 "2021-06-18T01:52:14Z")

</div>

Thanks so much for the reply and links! I may have gotten it to work, thanks to the official guide you posted.  
I uninstalled sendmail and replaced it with postfix.

Then I ran:

```auto
./bin/cake EmailQueue.sender

```

Passbolt sent off about 250 emails in the queue 😅  
My email account instantly exceeded the maximum amount of emails per hour and discarded the rest. I DID received about 50 of them before this happened, so hopefully I can check again in an hour to see if it’s fixed.

---

<div class="post-metadata">

**Author:** ![garrett](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/garrett/32/545_2.png) [@garrett](https://community.passbolt.com/u/garrett)\
**Post date:** [June 18, 2021, 3:12am UTC](https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996/4 "2021-06-18T03:12:40Z")

</div>

Yeah that sounds fixed!

---

<div class="post-metadata">

**Author:** ![dustbro](https://avatars.discourse-cdn.com/v4/letter/d/b5e925/32.png) [@dustbro](https://community.passbolt.com/u/dustbro)\
**Post date:** [June 18, 2021, 9:56am UTC](https://community.passbolt.com/t/test-email-working-other-emails-do-not/3996/5 "2021-06-18T09:56:36Z")

</div>

Confirmed. Thanks so much!
