常用邮箱SMTP服务器地址大全

常用邮箱SMTP服务器地址大全

  

  阿里云邮箱(mail.aliyun.com):

  POP3服务器地址:pop3.aliyun.com(SSL加密端口:995;非加密端口:110)

  SMTP服务器地址:smtp.aliyun.com(SSL加密端口:465;非加密端口:25)

  IMAP服务器地址:imap.aliyun.com(SSL加密端口:993;非加密端口:143)

  

  谷歌邮箱(google.com):

  POP3服务器地址:pop.gmail.com(SSL启用端口:995)

  SMTP服务器地址:smtp.gmail.com(SSL启用端口:587)

  

  新浪邮箱(sina.com):

  POP3服务器地址:pop3.sina.com.cn(端口:110)

  SMTP服务器地址:smtp.sina.com.cn(端口:25)

  

  Tom邮箱(top.com):

  POP3服务器地址:pop.tom.com(端口:110)

  SMTP服务器地址:smtp.tom.com(端口:25)

  

  网易邮箱(163.com):

  POP3服务器地址:pop.163.com(端口:110)

  SMTP服务器地址:smtp.163.com(端口:25)

  

  126邮箱:

  POP3服务器地址:pop.live.com(端口:995)

  SMTP服务器地址:smtp.126.com(端口:25)

  

  雅虎邮箱(yahoo.com):

  POP3服务器地址:pop.mail.yahoo.com

  SMTP服务器地址:smtp.mail.yahoo.com

  

  雅虎中国(yahoo.com.cn):

  POP3服务器地址:pop.mail.yahoo.com.cn(端口:995)

  SMTP服务器地址:smtp.mail.yahoo.com.cn(端口:587)

  雅虎邮箱POP3的SSL不启用端口为110,POP3的SSL启用端口995;SMTP的SSL不启用端口为25,SMTP的SSL启用端口为465。

  

  Foxmail邮箱(foxmail.com):

  POP3服务器地址:POP.foxmail.com(端口:110)

  SMTP服务器地址:SMTP.foxmail.com(端口:25)

  

  QQ邮箱(mail.qq.com)

  POP3服务器地址:pop.qq.com(端口:110)

  SMTP服务器地址:smtp.qq.com(端口:25)

  SMTP服务器需要身份验证。

  

  搜狐邮箱(sohu.com):

  POP3服务器地址:pop3.sohu.com(端口:110)

  SMTP服务器地址:smtp.sohu.com(端口:25)

  

  HotMail邮箱(hotmail.com):

  POP3服务器地址:pop.live.com(端口:995)

  SMTP服务器地址:smtp.live.com(端口:587

  

  移动139邮箱:

  POP3服务器地址:POP.139.com(端口:110)

  SMTP服务器地址:SMTP.139.com(端口:25)

  

  中华网邮箱(china.com):

  POP3服务器地址:pop.china.com(端口:110)

  SMTP服务器地址:smtp.china.com(端口:25)

  

  以上便是常用邮箱SMTP服务器地址大全。可能还有些邮箱木有收集到。我们在设置代收发邮件软件时候,在POP3服务器地址及SMTP服务器地址处,只需要按照以上邮箱对应填写即可。

  • 4
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Java中可以使用JavaMail API来发送邮件,其中SMTP协议是最常用的邮件发送协议之一。下面是一个简单的示例代码: ```java import java.util.Properties; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class SMTPJava { public static void main(String[] args) { final String username = "[email protected]"; final String password = "your_password"; Properties props = new Properties(); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.smtp.host", "smtp.example.com"); props.put("mail.smtp.port", "587"); Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(username, password); } }); try { Message message = new MimeMessage(session); message.setFrom(new InternetAddress("[email protected]")); message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]")); message.setSubject("Testing SMTP Java"); message.setText("Hello, this is a test email from SMTP Java"); Transport.send(message); System.out.println("Mail sent successfully"); } catch (MessagingException e) { throw new RuntimeException(e); } } } ``` 其中,需要修改的参数包括: - `username`和`password`:你的邮箱账号和密码; - `props.put("mail.smtp.host", "smtp.example.com");`:将`smtp.example.com`替换为你的邮箱提供商的SMTP服务器地址; - `message.setFrom(new InternetAddress("[email protected]"));`和`InternetAddress.parse("[email protected]")`:将`[email protected]`和`[email protected]`替换为你的发件人和收件人的邮箱地址。 需要注意的是,有些邮箱提供商可能需要设置授权码(例如Gmail),可以在邮箱设置中找到授权码,并将其替换为密码。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值