# [Usage](../../../usage.md) > Email helper

Use `EmailHelper::send()` when you need to send a plain HTML email through the default Laravel mailer without building a Mailable. For user notifications with inbox + optional email fallback, use the [Notification](../../components/others/notification.md) module instead.

Thin wrapper around `Mail::html()`: returns `true` on success, `false` on failure (exception is logged, never thrown).

---

## Method

### `EmailHelper::send($senderAddress, $receiverAddress, $emailTitle, $emailBody)`

#### Arguments

- **`$senderAddress`** *(string)*  
  Sender address used in `from()`.  
  Example: `'noreply@example.com'`


- **`$receiverAddress`** *(string)*  
  Recipient address used in `to()`.  
  Example: `'user@example.com'`


- **`$emailTitle`** *(string)*  
  Email subject.  
  Example: `'Your invoice #42'`


- **`$emailBody`** *(string)*  
  HTML body of the email.  
  Example: `'<p>Thanks for your order.</p>'`

#### What it does

- Sends via the app default mailer (`MAIL_*` env).
- Catches any `Exception`, logs `Email sending failed: ...` and returns `false`.

---

## Output

Returns `bool`:
- **`true`**: accepted by the mailer.
- **`false`**: sending failed, check `laravel.log`.

---

## Example

```php
use KFramework\Helpers\EmailHelper;

$sent = EmailHelper::send(
    'noreply@example.com',
    $user->email,
    'Welcome!',
    '<p>Your account is ready.</p>'
);

if (! $sent) {
    return back()->with(['error' => 'Email could not be sent.']);
}

return back()->with(['success' => 'Email sent.']);
```

Controller example with a form action closure:

```php
// app/Http/Controllers/ContactController.php
public function send(Request $request)
{
    $ok = EmailHelper::send(
        config('mail.from.address'),
        $request->input('email'),
        'Contact reply',
        '<p>' . e($request->input('message')) . '</p>'
    );

    return $ok
        ? back()->with(['success' => 'Reply sent.'])
        : back()->with(['error' => 'Reply not sent.']);
}
```

## See also

- [Usage](../../../usage.md)
- [Notification](../../components/others/notification.md) — persistent inbox + `send_email_at_creation`
- [Session messages](../frontend/session_messages.md) — `success` / `error` feedback after send
