helo需要邮件属性

时间:2017-10-26 04:35:15

标签: java email smtp javamail

系统管理员给了我这个,因为我无法使用我们的SMTP服务器。

enter image description here

堆栈跟踪:

<tbody>
  <tr>
    <td><?php echo $i++;?></td>
    <td><?php echo $d['tanggal_komplain'];?></td>
    <td><?php echo $d['nama_komplainer'];?><?php echo $d['pembuat'];?></td>
    <td><?php echo $d['departemen_tujuan'];?></td>
    <td><?php echo $d['personil_tujuan'];?></td>
    <td><?php echo $d['subject'];?></td>
    <td><?php echo $d['isi_komplain'];?></td>
    <td><?php echo $d['status'];?></td>
    <td class="align-middle text-center perbesar">
      <a href="#" id="pop">
        <img id="imageresource" src="image/<?php echo $d['nama_gambar']; ?>" width="80" height="80">
      </a>
    </td>
  </tr>
</tbody>    
<div class="modal fade" id="imagemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Image preview</h4>
      </div>
      <div class="modal-body">
        <img src="" id="imagepreview" style="width: 400px; height: 264px;" >
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>
  </div>
</div>

<script>
$("#pop").on("click", function() {
   $('#imagepreview').attr('src', $('#imageresource').attr('src')); // here asign the image to the modal when the user click the enlarge link
   $('#imagemodal').modal('show'); // imagemodal is the id attribute assigned to the bootstrap modal, then i use the show function
});
</script>

我应该添加除此之外的任何内容吗?喜欢helo?

javax.mail.MessagingException: Could not connect to SMTP host: mail.value-exch.com, port: 25, response: -1
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
    at javax.mail.Service.connect(Service.java:275)
    at javax.mail.Service.connect(Service.java:156)
    at javax.mail.Service.connect(Service.java:105)
    at javax.mail.Transport.send0(Transport.java:168)
    at javax.mail.Transport.send(Transport.java:98)

1 个答案:

答案 0 :(得分:2)

你问的是如何设置&#34; helo&#34;使用JavaMail时的值。如果这是您的问题,那么答案就是设置mail.smtp.localhost属性。

(如果那不是您的问题,请再次询问。)