gpt4 book ai didi

java电子邮件连接方法

转载 作者:行者123 更新时间:2023-12-01 14:59:36 25 4
gpt4 key购买 nike

我使用的代码与此处相同:How can I send an email by Java application using GMail, Yahoo, or Hotmail?用于发送电子邮件。它调用 transport.connect(...) 并且永远不会退出该方法调用。仅当我在公司网络中时才会发生这种情况。当我从不同的网络运行相同的程序时,它工作正常。

我尝试使用有线和无线连接来运行它,但实际上没有任何区别。

它没有从 transport.connect 方法中出来的任何原因......

最佳答案

您公司网络的防火墙会阻止您在代码中指定的端口上与 Gmail 的连接。

关于java电子邮件连接方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13869882/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com