gmail的smtp采用了ssl连接:
     Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)
     Use Authentication: Yes
     Use STARTTLS: Yes (some clients call this SSL)
     Port: 465 or 587

知道了gmail的发信细节,用System.Net.Mail,就是下面这段代码就可以了
使用System.Net.Mail通过gmail发送电子邮件using System;
使用System.Net.Mail通过gmail发送电子邮件
using System.Collections.Generic;
使用System.Net.Mail通过gmail发送电子邮件
using System.Text;
使用System.Net.Mail通过gmail发送电子邮件
using System.Net;
使用System.Net.Mail通过gmail发送电子邮件
using System.Net.Mail;
使用System.Net.Mail通过gmail发送电子邮件
使用System.Net.Mail通过gmail发送电子邮件
namespace GMailSend

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-05
  • 2021-05-22
  • 2021-12-16
  • 2022-12-23
  • 2021-07-19
猜你喜欢
  • 2021-07-16
  • 2021-09-11
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案