Skip to content

[Settings]: Email — SMTP Configuration #265

Closed

Description

@nielsdrost7

SMART Plan — Set "From" email address in Email Settings (per company)

Specific

A TextInput (email type) field labelled "From Email Address" in the Email tab of the Company Settings page. Stores a valid email address string under the key email_from_address, scoped to the current company. This address is used as the From: header for all outgoing emails (invoices, quotes, reminders) sent from this company.

Measurable

  • The field appears in the Email section of the Company Settings page
  • Saving the form persists the value to the settings table with key email_from_address and company_id scope
  • The value is read back correctly on page reload
  • The mailer resolves this setting when constructing outgoing mail for this company

Achievable

  1. Create/extend Modules/Core/Filament/Company/Pages/CompanySettings.php (Filament page with tabs)
  2. Add a TextInput::make('email_from_address')->label('From Email Address')->email() field to the Email tab section
  3. Add const EMAIL_FROM_ADDRESS = 'email_from_address'; to Modules/Core/Models/Setting.php constants
  4. Register the page in CompanyPanelProvider

Relevant

In a multi-tenant system, each company must be able to send emails from their own domain address (e.g. billing@acme.com). Without a per-company From address, all outgoing mail would appear to come from a shared system address, which damages branding and deliverability.

Time-bound

Sprint 6.


Arrange · Act · Assert

// Modules/Core/Tests/Feature/CompanySettingsTest.php

#[Test]
public function it_saves_email_from_address_setting(): void
{
    /* Arrange */
    $page = Livewire::actingAs($this->user)
        ->test(\Modules\Core\Filament\Company\Pages\CompanySettings::class);

    /* Act */
    $page->set('data.email_from_address', 'billing@acme.com')
         ->call('save');

    /* Assert */
    $page->assertSuccessful();
    $this->assertDatabaseHas('settings', [
        'company_id' => $this->company->id,
        'key'        => 'email_from_address',
        'value'      => 'billing@acme.com',
    ]);
}

Activity

  1. coderabbitai commented on Dec 28, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Related Issues

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added this to the v2.0.0-alpha milestone on Dec 28, 2025
  3. changed the title [-]As an Admin in the Company Panel (Email tab, Per Company!) i want to be able to set "Attach Quote / Invoice on Email"[/-] [+][Settings]: Email — SMTP Configuration[/+] on Jun 13, 2026
  4. nielsdrost7 commented on Jul 24, 2026

    @nielsdrost7
    CollaboratorAuthor

    SMART Plan — Email settings per-company: From address

    Context/Epic: Settings

    This is a straightforward email field with good measurable test coverage. A couple of notes:

    1. Sequencing: This pairs naturally with [Settings]: Email — Default Email Sender #266 (SMTP/mail driver config) — consider doing them together in one CompanySettings page scaffolding work. Modules/Core/Filament/Company/Pages/CompanySettings.php doesn't exist yet; this batch of 8 settings issues ([Settings]: Invoices — Client Portal & Public Links #259–266) will be the first to use it.

    2. Mailer integration: You'll need to hook this into the mailer after the TenantMailConfigurator from [Settings]: Email — Default Email Sender #266 sets up the mail config, so the From address overrides what Laravel defaults to. A good place is in a custom MailableBuilder or a middleware-level config override.

    3. Validation: Consider validating the email format before storing — Filament's ->email() does this on the UI side, but the Settings table stores strings, so a mutator or observer could add server-side validation.

    Ready to implement — clear, low-risk companion to #266.

  5. nielsdrost7 commented on Jul 24, 2026

    @nielsdrost7
    CollaboratorAuthor

    Correction: an unmerged local branch, settings-cluster-2026-07-19, already implements this via a new Modules/Core/Filament/Company/Pages/CompanySettings.php page (490 lines) + CompanySettingsTest.php, covering mail send method/from-address, default invoice/quote tax rates, quote PDF template/public/email templates, quote footer, quote validity days, invoice/quote PDF password + mark-as-sent toggles, and invoice default footer. The SMART Plan comment above was posted in error by an automated grooming pass that didn't check non-issue-numbered branch names. Please check that branch before implementing this from scratch — it may just need finishing/rebasing rather than a fresh implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinedRefined with SMART plan / test suggestions

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions