最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
记得原来有人问过用socket实现smtp,这是我的一部分代码
时间:2022-07-02 12:05:05 编辑:袖梨 来源:一聚教程网
namespace mySmtp
{
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Collections;
interface ITransport
{
void setHost(String smtpHost);
String getHost();
void setPort(int smtpPort);
int getPort();
void sendMail(MailMessage msg);
}
public class Smtp : ITransport
{
private String smtpHost;
private int smtpPort;
public Smtp()
{
//smtpHost = "127.0.0.1";
//smtpPort = 25;
}
public Smtp(String host, int port)
{
smtpHost = host;
smtpPort = port;
{
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Collections;
interface ITransport
{
void setHost(String smtpHost);
String getHost();
void setPort(int smtpPort);
int getPort();
void sendMail(MailMessage msg);
}
public class Smtp : ITransport
{
private String smtpHost;
private int smtpPort;
public Smtp()
{
//smtpHost = "127.0.0.1";
//smtpPort = 25;
}
public Smtp(String host, int port)
{
smtpHost = host;
smtpPort = port;
相关文章
- 地缘政治事件中的加密货币薪资合规指南 07-12
- 原神玛薇卡培养攻略 玛薇卡全方位养成攻略 07-12
- 剑星红莲解锁方法是什么 红莲获取途径介绍 07-12
- 无畏契约源能行动铁臂怎么玩-铁臂实战玩法教学 07-12
- 幻兽帕鲁猫蝠怪是什么属性的 帕鲁猫蝠怪详细介绍 07-12
- Gravity Forms v2.9.12 汉化版 WordPress表单插件 07-12