<xf:title>{{ phrase('test_outbound_email') }}</xf:title>
<xf:description>{{ phrase('use_this_tool_to_diagnose_outbound_mail_transport_issues') }}</xf:description>

<xf:if is="$result">
	<xf:if is="$result.sent is not empty">
		<div class="blockMessage blockMessage--success">
			{{ phrase('email_was_sent_successfully_with_no_errors') }}
			<xf:if is="$transportClass == 'Symfony\Component\Mailer\Transport\SendmailTransport'">
				{{ phrase('note_error_tracking_limited_with_sendmail_check_email_log') }}
			</xf:if>
		</div>
	<xf:else />
		<div class="blockMessage blockMessage--error">
			{{ phrase('errors_were_encountered_while_trying_to_send_email') }}
		</div>
	</xf:if>
	<xf:if is="$result.log">
		<div class="block">
			<div class="block-container">
				<h3 class="block-formSectionHeader">
					<span class="collapseTrigger collapseTrigger--block" data-xf-click="toggle" data-target="< :up:next">
						{{ phrase('expand_log_details') }}
					</span>
				</h3>
				<div class="block-body block-body--contained block-body--collapsible" tabindex="-1">
					<div class="block-row">
						<pre>{$result.log}</pre>
					</div>
				</div>
			</div>
		</div>
	</xf:if>
</xf:if>

<xf:form action="{{ link('tools/test-email') }}" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:textboxrow name="email" value="{$email}" type="email"
				label="{{ phrase('email') }}"
				dir="ltr" />

			<xf:formrow label="{{ phrase('email_transport_class') }}">
				<code>\{$transportClass}<xf:if is="$transportExtra"> ({$transportExtra})</xf:if></code>
			</xf:formrow>
		</div>
		<xf:submitrow submit="{{ phrase('run_test') }}" />
	</div>
</xf:form>