From address is not automatically populated when a regular user is creating an email, unable to set default Outbound Account for regular user

CentOS Linux 7 (Core) | Apache/2.4.6 | PHP 8.3.8 | SuiteCRM version 8.9.1 | MariaDB version 11.1.6 | PHP 8.3.8

Its a near-fresh installation just made a couple changes within the suitecrm ui

Problem

When a regular user composes an email, the From address is not automatically populated with their email address.

I want this to be automatically populated because users will only be sending from one email.

Current Setup

  • Each user has their own inbound and outbound email accounts, they are of type “Personal”.

  • Each user is the owner of their own inbound and outbound accounts.

  • In the roles, users have FULL access to Outbound Account module, all permissions are set to “All”.

What I’ve Observed

  • When I log in as Admin and set an Outbound account as Default, the From address auto-populates correctly when composing an email.

  • When I log in as a regular user, none of the outbound accounts show as Default.

  • This confirms that default email settings are user-specific, not global.

  • A regular user can set a default inbound account, but cannot set a default outbound account.

Any guidance on where to check (roles, security groups, config, or database) would be greatly appreciated.

Check out the roles and security for regular users!

Hello,

there is currently some re-structuring going on around the emails.
In the next version, there’ll be some updates / changes as well:

The new email compose feature is relatively new.
It could be defined as a bug / improvement / issue:

If I only have one outbound mailbox, I shall not be required to select this one to send from.

Do you want to add an issue to the queue?

Thanks for the link @rsp

I have been through this page, I have already configured roles and security groups, including security suite settings.

I even created a test user and gave it full access to all modules via the roles/security groups yet they still can’t set an outbound email account as default.

I’m wondering is there a way to set a default outbound email account for a specific user from the database :thinking:

(Screenshot from ADMIN account, as you can see the option is there, it is missing when the regular user “Phil” accesses the page)

Attention to the emails module in the roadmap is good @BastianHammer though its hard to say if it will be included in the update, I will make an issue on git when I get a chance

Update:

I did some digging in the database and the setting is stored inside the “user_preferences” table inside the “contents” column

There are 15+ rows in the table for each user and they are all Base64 encoded

After finding the correct row and decoding I found this line for the admin account that sets the default outbound email account

s:16:“defaultOEAccount”;s:36:“YOUR-OUTBOUND-ACCOUNT-ID”;

This line will only be set if the account has a default outbound account defined, I tried adding the line in anyways but it didn’t make a difference. I’m guessing this is a caching table and the true value is set somewhere else.

You can check config.php and config_override.php files.

Also, .env or .env.local files.

1 Like

I proposed a fix for this issue for SuiteCRM core.

I traced this to a mismatch between user ownership and default-outbound preference handling.

In compose, the From field (outbound_email_name) is initialized by outbound-email-default.
Before this fix, that process only looked at the user preference Emails.defaultOEAccount. If that preference was empty, compose stayed blank.

The issue is that for personal outbound accounts created by an admin, default assignment and “Set as default” checks were effectively tied to created_by in some paths, not the personal account owner (user_id). So regular users could end up with no usable default even though they owned a valid personal outbound account.

Logic in PR #874

https://github.com/SuiteCRM/SuiteCRM-Core/pull/874

  1. Owner-based default assignment on save
    For type=user outbound accounts, default is assigned to the account owner (user_id), not implicitly to the current session user.

  2. Owner-based SetDefault flow
    “Set as default” resolves owner by user_id first (for personal accounts), and UI visibility is based on owner/admin, not only creator.

  3. Safe compose fallback
    If defaultOEAccount is empty, compose now auto-selects the outbound account only when the user has exactly one valid personal outbound account.
    If there are multiple (or none), it still requires explicit user selection (no risky guessing).

This keeps behavior predictable and fixes the regular-user case without changing transport/sending logic.

The Pull Request needs to be reviewed by two write-access developers to be merged into SuiteCRM Core.

2 Likes

How interesting, thank you so much for your reply,

I deleted the outbound account and recreated it as the actual user and it was automatically assigned as default. Email from is auto-selected now. Hope your pull request can get some attention, this feels like a no brainer!

You can react with :+1: on the PR to get some attention! :partying_face:

2 Likes