<?php include_once( "../../../../spider.inc.php" ); ?>
{module:system.package.LoadList}
{module:system.package.install.Form}
	{set:targetPackageId get.sysmailpid}
	{set:packageUpperStr strtoupper(targetPackageId)}
	{set:optionVarName packageUpperStr . '_MAIL_SEND_METHOD_OPTIONS'}
	{set:methodVarName packageUpperStr . '_MAIL_SEND_METHOD'}
	{foreach:system.package.install.install_object_hash packageObject}
	{if:packageObject->getPackageId()==targetPackageId}{set:targetPackageObject packageObject}{/if}
	{/foreach}
	{set:definitionHash targetPackageObject->'definitionHash'}
	{set:mailOptionHash definitionHash[optionVarName]}

	{if:'smtp'==get.sysmailmtd}
	<h2>SMTP接続設定</h2>

	<table style="width:95%;margin:0 auto;">
	<tbody>
	<tr>
		<th style="width:16em;">PEARライブラリパス <span class="required">※</span></th>
		<td>
			<input type="text" name="{write:optionVarName}[pear_path]" size="30" value="{write:stripslashes(mailOptionHash['pear_path'])}" />
		</td>
	</tr>
	<tr>
		<th style="width:16em;" nowrap>SMTPホスト名 <span class="required">※</span></th>
		<td><input type="text" name="{write:optionVarName}[smtp_host]" size="30" value="{write:stripslashes(mailOptionHash['smtp_host'])}" /></td>
	</tr>
	<tr>

		<th style="width:16em;" nowrap>SMTPポート番号 <span class="required">※</span></th>
		<td><input type="text" name="{write:optionVarName}[smtp_port]" size="10" value="{write:stripslashes(mailOptionHash['smtp_port'])}" /></td>
	</tr>
	<tr>
		<th style="width:16em;" nowrap>SMTP認証方法 <span class="required">※</span></th>
		<td>
			<select name="{write:optionVarName}[smtp_auth]">
				<option value="false"{if:mailOptionHash['smtp_auth']='false'} selected{/if}>認証なし</option>
				<option value="true"{if:mailOptionHash['smtp_auth']='true'} selected{/if}>認証自動</option>
				<option value="PLAIN"{if:mailOptionHash['smtp_auth']='PLAIN'} selected{/if}>PLAIN</option>
				<option value="DIGEST"{if:mailOptionHash['smtp_auth']='DIGEST'} selected{/if}>DIGEST-MD5</option>
				<option value="CRAM"{if:mailOptionHash['smtp_auth']='CRAM'} selected{/if}>CRAM-MD5</option>
			</select>
		</td>
	</tr>
	<tr>
		<th style="width:16em;" nowrap>SMTPユーザID</th>
		<td><input type="text" name="{write:optionVarName}[smtp_auth_user]" size="30" value="{write:stripslashes(mailOptionHash['smtp_auth_user'])}" /></td>
	</tr>
	<tr>
		<th style="width:16em;" nowrap>SMTPパスワード</th>
		<td><input type="password" name="{write:optionVarName}[smtp_auth_pass]" size="30" value="{write:stripslashes(mailOptionHash['smtp_auth_pass'])}" /></td>
	</tr>
	</tbody>
	</table>
	{else-if:'sendmail'==get.sysmailmtd}
	<h2>sendmail設定</h2>

	<table style="width:95%;margin:0 auto;">
	<tbody>
	<tr>
		<th style="width:16em;">sendmailコマンドパス <span class="required">※</span></th>
		<td><input type="text" name="{write:optionVarName}[sendmail_path]" size="30" value="{write:htmlspecialchars(mailOptionHash['sendmail_path'])}" /></td>
	</tr>
	</tbody>
	</table>
	
	{else}
	{/if}
	