首页 > 代码库 > smtpclient 邮件发送测试

smtpclient 邮件发送测试

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SmtpClient sc = new SmtpClient("smtp.qq.com");
sc.Credentials = new NetworkCredential("739423721@qq.com", "*******");
sc.Send("739423721@qq.com", "1431758338@qq.com", "hello", "ceshi");
}
}
}

smtpclient 邮件发送测试