Email not sending after upgrading to v2

Did you try to let the username and password fields empty ?

that doesnt work that gives me an error in the app.php if i do that and if leave the username and password on null it still tries to authenticate

So your setup is a SMTP server with no TLS and no authentication right? (so that I can try to reproduce)

yes it sends thru postfix without authentication than it goes to the outside of the passbolt server and gets send through our authenticated smtp servers and than delivered

However it isnt getting to postfix because passbolt is trying to authenticate when that is not neccecary

Could you check if work when you remove the following line in app.php

    'username' => env('EMAIL_TRANSPORT_DEFAULT_USERNAME', null),
    'password' => env('EMAIL_TRANSPORT_DEFAULT_PASSWORD', null),

Maybe username and password shouldn’t be set (instead of being set to null) e.g. left unset for it to work, or you have an environment variable set?

already tried removing them didnt work

this is my whole email config:

'EmailTransport' => [
'default' => [
    'className' => env('EMAIL_TRANSPORT_DEFAULT_CLASS_NAME', 'Smtp'),
    // The following keys are used in SMTP transports
    'host' => env('EMAIL_TRANSPORT_DEFAULT_HOST', 'localhost'),
    'port' => env('EMAIL_TRANSPORT_DEFAULT_PORT', 25),
    'timeout' => env('EMAIL_TRANSPORT_DEFAULT_TIMEOUT', 30),
    'client' => env('EMAIL_TRANSPORT_DEFAULT_CLIENT', null),
    'tls' => env('EMAIL_TRANSPORT_DEFAULT_TLS', false),
    'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
'Debug' => [
    'className' => 'Debug'



  • Email delivery profiles
  • Delivery profiles allow you to predefine various properties about email
  • messages from your application and give the settings a name. This saves
  • duplication across your application and makes maintenance and development
  • easier. Each profile accepts a number of keys. See Cake\Mailer\Email
  • for more information.
    ‘Email’ => [
    ‘default’ => [
    ‘transport’ => env(‘EMAIL_DEFAULT_TRANSPORT’, ‘default’),
    ‘from’ => env(‘EMAIL_DEFAULT_FROM’, ‘’),
    //‘charset’ => ‘utf-8’,
    //‘headerCharset’ => ‘utf-8’,

What happens when you manually run
/var/www/pb/bin/cake EmailQueue.sender
./bin/cake passbolt send_test_email

My email config (we use Office 365, wasn’t my decision):
# grep -A 30 "EmailT" /var/www/pb/config/passbolt.php

'EmailTransport' => [
    'default' => [
        'host' => '',
        'port' => 587,
        'username' => '',
        'password' => 'email_password',
        // 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' => ['' => 'Passbolt'],
        //'charset' => 'utf-8',
        //'headerCharset' => 'utf-8',

My crontab
# crontab -l
* * * * * su -c "/var/www/pb/bin/cake EmailQueue.sender >> /var/log/passbolt.log 2>&1" -s /bin/bash www-data
(for later work)

gives me an error about authentication not being on postfix
i have made a discovery when i use send test email with a username that i set it still shows username 0

Username: 0
Password: *********

I fixed it it was a problem on my end
I only edited app.php but when i edited passbolt.php it started working

If i try to empty the queue with cake EmailQueue.sender it still does nothing

Is it working now? I don’t understand where you are at sorry.

So when i use the send_test_mail it works it sends a test mail succesfully
However my cronjob is not working and if i manually use mailqueue.sender it does nothing
So it wont empty the queue

It’s the first time i’m hearing about this. Could it be because you’ve hit the maximum number of retries? Can you try editing an email record in the database and lowering the number to 0?

sure thing what table should i edit?

do you want me to empty the email_queue in the database ?

No not empty the email queue, just edit the “send_tries” of one of the emails that are not sending.
If send tries is > 3 email will not be find to be sent.

@lanaiscool actually there is already a command for that:

./bin/cake EmailQueue.sender clear_locks

EmailQueue.sender clear_locks this command didnt work but manually changing the send tries to 0 worked thanks for your help :slight_smile:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.