email.html 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.ds_message}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <form method="post">
  13. <table class="ds-default-table">
  14. <tbody>
  15. <tr class="noborder">
  16. <td class="required w120">{$Think.lang.smtp_server}</td>
  17. <td class="vatop rowform"><input type="text" name="email_host" id="email_host" value="{$list_config.email_host}" class="w200"/></td>
  18. <td class="vatop tips"><p class="notic">{$Think.lang.set_smtp_server_address}</p></td>
  19. </tr>
  20. <tr class="noborder">
  21. <td class="required w120">{$Think.lang.email_secure}</td>
  22. <td class="vatop rowform">
  23. <select name="email_secure" id="email_secure">
  24. <option value="tls" {if $list_config.email_secure eq 'tls'}selected=selected{/if}>{$Think.lang.email_secure_tls}</option>
  25. <option value="ssl" {if $list_config.email_secure eq 'ssl'}selected=selected{/if}>{$Think.lang.email_secure_ssl}</option>
  26. </select>
  27. </td>
  28. <td class="vatop tips"><p class="notic">{$Think.lang.set_email_secure}</p></td>
  29. </tr>
  30. <tr class="noborder">
  31. <td class="required w120">{$Think.lang.email_port}</td>
  32. <td class="vatop rowform"><input type="text" name="email_port" id="email_port" value="{$list_config.email_port}" class="w200"/></td>
  33. <td class="vatop tips"><p class="notic">{$Think.lang.set_email_port}</p></td>
  34. </tr>
  35. <tr class="noborder">
  36. <td class="required w120">{$Think.lang.sender_mail_address}</td>
  37. <td class="vatop rowform"><input type="text" name="email_addr" id="email_addr" value="{$list_config.email_addr}" class="w200"/></td>
  38. <td class="vatop tips"><p class="notic">{$Think.lang.if_smtp_authentication}</p></td>
  39. </tr>
  40. <tr class="noborder">
  41. <td class="required w120">{$Think.lang.smtp_user_name}</td>
  42. <td class="vatop rowform"><input type="text" name="email_id" id="email_id" value="{$list_config.email_id}" class="w200"/></td>
  43. <td class="vatop tips"><p class="notic">{$Think.lang.smtp_user_name_tip}</p></td>
  44. </tr>
  45. <tr class="noborder">
  46. <td class="required w120">{$Think.lang.smtp_user_pwd}</td>
  47. <td class="vatop rowform"><input type="password" name="email_pass" id="email_pass" value="{$list_config.email_pass}" class="w200"/></td>
  48. <td class="vatop tips"><p class="notic">{$Think.lang.smtp_user_pwd_tip}</p></td>
  49. </tr>
  50. <tr class="noborder">
  51. <td class="required w120">{$Think.lang.test_mail_address}</td>
  52. <td class="vatop rowform">
  53. <input type="text" name="email_test" id="email_test" value="" class="w200"/>
  54. <input type="button" value="{$Think.lang.test_mail}" name="send_test_email" class="btn btn-small" id="send_test_email" >
  55. </td>
  56. </tr>
  57. </tbody>
  58. <tfoot>
  59. <tr class="tfoot">
  60. <td></td>
  61. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  62. </tr>
  63. </tfoot>
  64. </table>
  65. </form>
  66. </div>
  67. <script>
  68. $(document).ready(function(){
  69. $('#send_test_email').click(function(){
  70. $.ajax({
  71. type:'POST',
  72. url:"{:url('Message/email_testing')}",
  73. data:{'email_host':$('#email_host').val(),'email_secure':$('#email_secure option:selected').val(),'email_port':$('#email_port').val(),'email_addr':$('#email_addr').val(),'email_id':$('#email_id').val(),'email_pass':$('#email_pass').val(),'email_test':$('#email_test').val()},
  74. error:function(html){
  75. layer.alert(html.msg);
  76. },
  77. success:function(html){
  78. layer.alert(html.msg);
  79. },
  80. dataType:'json'
  81. });
  82. });
  83. });
  84. </script>