@php $setupChannel = $setupChannel ?? null; if (! in_array($setupChannel, ['mail', 'line'], true)) { $setupChannel = null; } $inSetupFlow = $setupChannel !== null; @endphp @extends($inSetupFlow ? 'layouts.setup' : 'layouts.app') @php $listActiveQuery = array_filter(['setup_channel' => $setupChannel]); $listArchivedQuery = array_filter(['archived' => ($account->is_archived ?? false) ? 1 : 0, 'setup_channel' => $setupChannel]); $accountType = old('type', $account->type); $hideDeliveryType = $setupChannel !== null; $showMailFields = in_array($accountType, ['email', 'both'], true); $lineOnlyEdit = ! $showMailFields; $showLineFields = in_array($account->type, ['line', 'both'], true); $lineStepwiseSave = $showLineFields; @endphp @section('title') @if($setupChannel === 'mail') メール設定 @elseif($setupChannel === 'line') LINE設定 @else メール・LINE配信 - 各種設定 - {{ $account->name }} @endif @endsection @if(! $inSetupFlow) @section('delivery-primary-tabs') @include('account.partials.mail-delivery-primary-tabs', ['mailDeliveryTab' => 'accounts']) @endsection @endif @section('page-title') @if($setupChannel === 'mail') メール設定 @elseif($setupChannel === 'line') LINE設定 @else 各種設定 — {{ $account->name }} @endif @endsection @if(! $inSetupFlow) @section('page-subtitle') @if($setupChannel === 'mail') 「{{ $account->name }}」の送信者名・送信元メール・SMTPを編集しています。 @elseif($setupChannel === 'line') @if($lineOnlyEdit) アカウント名と LINE公式アカウントの連携(Messaging API・LINEログイン)をこの画面で設定します。メールの送信者名・送信元は LINE専用では使いません。 @else 「{{ $account->name }}」はメール併用です。送信者・SMTP と下の LINE連携の両方を設定してください。 @endif @else 「{{ $account->name }}」のメール送信(送信者・SMTP)を編集しています。LINE の Messaging API などはシナリオ一覧の「LINEアカウント設定」です。タブにマウスを乗せると、送信用アカウントと送信ドメイン認証の違いが表示されます。 @endif @endsection @endif @push('styles') @endpush @if($inSetupFlow) @section('setup_body') @else @section('content') @endif @if($inSetupFlow)
一覧へ戻る
@else
送信用アカウント一覧 アーカイブ済 各種設定
送信用アカウント一覧
@endif
@if($inSetupFlow && $setupChannel === 'mail') 送信者・SMTP({{ $account->name }}) @elseif($setupChannel === 'line' && ! in_array($account->type, ['email', 'both'], true)) 基本情報({{ $account->name }}) @elseif($inSetupFlow && $setupChannel === 'line') 基本情報({{ $account->name }}) @else メール送信・基本情報 @endif
@if($lineOnlyEdit)

この「基本情報」では、この送信用アカウントの表示名(アカウント名)の変更と、アーカイブ(棚上げ)の切り替えだけを行います。
LINEとの連携設定に関しては、少し下の「LINE連携」で実施します。

@endif
@csrf @method('PUT') @if($setupChannel !== null) @endif
@if($hideDeliveryType) @else
@endif @if($showMailFields)
@if($hideDeliveryType && $setupChannel === 'mail')
入力必須です。
@else
種類が「メールのみ / メール+LINE」の場合は入力必須です。
@endif
送信元は独自ドメインのメールアドレスを推奨します。
@php $useExtVal = old('use_external_smtp'); if ($useExtVal === null) { $useExtSel = ($account->use_external_smtp ?? false) ? '1' : '0'; } else { $useExtSel = ((string) $useExtVal === '1' || $useExtVal === true || $useExtVal === 1) ? '1' : '0'; } $encSel = old('smtp_encryption', $account->smtp_encryption ?? 'tls'); @endphp

外部SMTP(任意)
複雑な設定になります。このまま(「利用しない」)でも、送信者名・送信元メールが入っていれば通常どおりメールを送れます。 Gmail や自社の SMTP サーバーなど、別経路で送りたい場合だけ「利用する」を選んでください。

「利用しない」のときは monaka の既定の送信経路を使います。「利用する」を選んだときだけ、下の SMTP 接続情報の入力が必要です。

@error('use_external_smtp')
{{ $message }}
@enderror
「利用する」を選んだ場合は SMTP ホスト・ポートが必須です。
@error('smtp_host')
{{ $message }}
@enderror
@error('smtp_port')
{{ $message }}
@enderror
@endif
is_archived ?? false) ? 'checked' : '' }}>
@include('partials._archive_explanation')
{{ $inSetupFlow ? '一覧へ戻る' : '戻る' }}
@if($showLineFields)
LINE連携ステップ1→2→3の順に設定し、各ステップの保存ボタンでその都度保存します
@include('account.partials.line-account-edit-fields', [ 'account' => $account, 'lineWebhookUrl' => $lineWebhookUrl ?? null, 'setupChannel' => $setupChannel, 'stepwiseSave' => true, ])
@endif @if(in_array($account->type, ['email', 'both'], true))
送信テスト

保存済みの送信元で、入力した宛先へ 1 通だけ送ります(外部SMTPを利用するがオンのときはその経路、オフのときはサーバー既定)。まずは更新するで設定を保存してから試してください。 DKIM/DMARC がメール本文で PASS するかは DNS と送信サービス側にもよります。

@csrf
@error('test_to')
{{ $message }}
@enderror
@endif
@endsection @push('scripts') @endpush