Use organization logo in Meet outbound emails.
Deploy Ladill Meet / deploy (push) Successful in 1m28s

Replace the product email mark with company logo or name in contact-message mail.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-12 20:08:04 +00:00
co-authored by Cursor
parent 585ef5bb11
commit 5b7bb88767
8 changed files with 195 additions and 9 deletions
+11 -2
View File
@@ -3,6 +3,8 @@
namespace App\Services\Comms;
use App\Mail\ContactMessageMail;
use App\Models\Organization;
use App\Support\OrganizationBranding;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
@@ -13,14 +15,21 @@ use Illuminate\Support\Facades\Mail;
*/
class EmailService
{
public function send(string $to, string $subject, string $body, ?string $fromName = null, ?string $replyTo = null): bool
public function send(string $to, string $subject, string $body, ?string $fromName = null, ?string $replyTo = null, ?Organization $organization = null): bool
{
if (! filter_var($to, FILTER_VALIDATE_EMAIL)) {
return false;
}
$logoUrl = null;
$companyName = null;
if ($organization) {
$logoUrl = OrganizationBranding::emailLogoUrl($organization);
$companyName = $organization->name;
}
try {
Mail::to($to)->send(new ContactMessageMail($subject, $body, $fromName, $replyTo));
Mail::to($to)->send(new ContactMessageMail($subject, $body, $fromName, $replyTo, $logoUrl, $companyName));
return true;
} catch (\Throwable $e) {