本文实例讲述了asp.net基于windows服务实现定时发送邮件的方法。分享给大家供大家参考,具体如下:

//定义组件

private System.Timers.Timer time;

public int nowhour;

public int minutes;

public string sendTime;

public Thread th;

public string isOpen;//是否启用定时发送

public string strToEUser;

public static int index = -1;

public static ArrayList mulitaddress;

//服务开始

protected override void OnStart(string[] args)

{

time = new System.Timers.Timer();

time.Enabled = true;

time.AutoReset = true;

//定时执行方法

time.Elapsed+=new System.Timers.ElapsedEventHandler(time_Elapsed);

UserEmail toUser =new UserEmail();

mulitaddress = GetMailAdressName();

// LogHelper.SaveNote("当前索引的值" + index.ToString());

Thread.Sleep(2000);

time.Start();

}

public class LogHelper

{

public static void SaveNote(string note)

{

FileStream stream = new FileStream(GetLogDirectory("Common") + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.Append, FileAccess.Write, FileShare.Delete | FileShare.ReadWrite);

StreamWriter writer = new StreamWriter(stream, Encoding.UTF8);

writer.WriteLine("================================================================");

writer.WriteLine(string.Format("Note:/t{0}", note));

writer.WriteLine(string.Format("DateTime:/t{0}/r/n/r/n",DateTime.Now.ToString()));

stream.Flush();

writer.Close();

stream.Close();

stream.Dispose();

writer.Dispose();

}

public static void SaveNote(string note, string txtname)

{

FileStream stream = new FileStream(GetLogDirectory(txtname) + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.Append, FileAccess.Write, FileShare.Delete | FileShare.ReadWrite);

StreamWriter writer = new StreamWriter(stream, Encoding.GetEncoding("gb2312"));

writer.WriteLine("================================================================");

writer.WriteLine(string.Format("Note:/t{0}", note));

writer.WriteLine(string.Format("DateTime:/t{0}/r/n/r/n", DateTime.Now.ToString("yyyyMMddHHmmss")));

stream.Flush();

writer.Close();

stream.Close();

stream.Dispose();

writer.Dispose();

}

public static void SaveException(Exception e)

{

SaveException(e, string.Empty);

}

public static void SaveException(Exception e, string memo)

{

FileStream stream = new FileStream(GetLogDirectory("Common") + DateTime.Now.ToString("yyyy-MM-dd") + ".txt", FileMode.Append, FileAccess.Write, FileShare.Delete | FileShare.ReadWrite);

StreamWriter writer = new StreamWriter(stream);

writer.WriteLine("================================================================");

writer.WriteLine(string.Format("Memo:/t{0}", memo));

writer.WriteLine(string.Format("DateTime:/t{0}", DateTime.Now.ToShortTimeString()));

writer.WriteLine(string.Format("Message:/t{0}", e.Message));

writer.WriteLine(string.Format("StackTrace:/r/n----------/r/n{0}/r/n----------/r/n/r/n/r/n", e.StackTrace));

stream.Flush();

writer.Close();

stream.Close();

stream.Dispose();

writer.Dispose();

}

public static string GetLogDirectory(string category)

{

string baseDirectory = string.Empty;

if ((HttpContext.Current != null) && (HttpContext.Current.Server != null))

{

baseDirectory = HttpContext.Current.Server.MapPath("~");

}

else

{

baseDirectory = AppDomain.CurrentDomain.BaseDirectory;

}

if ((baseDirectory[baseDirectory.Length - 1] != '/') && (baseDirectory[baseDirectory.Length - 1] != '//'))

{

baseDirectory = baseDirectory + @"/";

}

baseDirectory = string.Format(@"{0}Log/{1}/", baseDirectory, category);

if (!Directory.Exists(baseDirectory))

{

Directory.CreateDirectory(baseDirectory);

}

return baseDirectory;

}

}

void time_Elapsed(object sender, System.Timers.ElapsedEventArgs e)

{

try

{

if (mulitaddress != null)

{

LogHelper.SaveNote("进入time_Elapsed");

//获取定时发送时间

sendTime = Convert.ToString(GetConfigValue("sendTime"));

LogHelper.SaveNote("sendTime" + sendTime);

//是否开启定时发送功能

isOpen = GetConfigValue("isOpen");

int sleeptime = Convert.ToInt32(GetConfigValue("SleepTime"));

int stoptime = Convert.ToInt32(GetConfigValue("stoptime"));

//LogHelper.SaveNote("数组长度" + mulitaddress.Count);

// LogHelper.SaveNote("是否开启定时发送功能" + isOpen + "定时时间" + sendTime + "定时小时数:" + Convert.ToInt32(sendTime.Split(new char[] { ':' })[0]) + "定时分钟数:" + Convert.ToInt32(sendTime.Split(new char[] { ':' })[1]));

if (isOpen == "true")

{

//现在时间 小时

nowhour = Convert.ToInt32(DateTime.Now.Hour.ToString());//10

//现在分钟

minutes = Convert.ToInt32(DateTime.Now.Minute.ToString());//5

//获取发送小时

int sendhour = Convert.ToInt32(sendTime.Split(new char[] { ':' })[0]);

//获取发送的分钟

int sendMinute = Convert.ToInt32(sendTime.Split(new char[] { ':' })[1]);

LogHelper.SaveNote("进入定时发送邮件服务! 定时小时为:" + sendhour.ToString() + "定时分钟为:" + sendMinute.ToString() + "现在小时为:" + nowhour.ToString() + "现在定时的分钟为:" + minutes.ToString());

LogHelper.SaveNote("当前索引的值" + index.ToString());

if (nowhour == stoptime)

{

LogHelper.SaveNote("停止时间点到了 邮件停止发送 !!!");

index = -1;

}

else

{

//如果和当前的时间 小时相等 则定时发送邮件

if ((Convert.ToDateTime(DateTime.Now.ToShortTimeString()) >= Convert.ToDateTime(sendTime)) && index < mulitaddress.Count)

{

index++;

if (index < mulitaddress.Count)

{

SendEmail(((UserEmail)mulitaddress[index]));

}

else

{

LogHelper.SaveNote("发送完毕 当前的索引值为" + index.ToString());

}

}

}

}

else

{

//LogHelper.SaveNote("当前索引的值" + index.ToString());

index++;

if (index < mulitaddress.Count)

{

SendEmail(((UserEmail)mulitaddress[index]));

}

else

{

LogHelper.SaveNote("发送完毕 时间停止");

time.Enabled = false;

time.Stop();

}

}

Thread.Sleep(sleeptime);

}

else

LogHelper.SaveNote("mulitaddress=null");

}

catch (Exception ex)

{

LogHelper.SaveNote(ex.ToString());

}

}

public ArrayList GetMailAdressName()

{

ArrayList list = new ArrayList();

string strSQL = "select b.mailAddress, a.mailtemplate,a.title from tg_product as a inner join tg_mailOrder as b on a.ccode=b.ccode where a.createtime=(select max(createtime) from tg_product)";

SqlDataReader dr = SqlHelper.ExecuteReader(CommandType.Text, strSQL, null);

if (dr.HasRows)

{

while (dr.Read())

{

UserEmail email = new UserEmail();

email.Mailaddres = dr["mailAddress"].ToString();

email.Title = dr["title"].ToString();

email.Contents = dr["mailtemplate"].ToString();

list.Add(email);

}

}

return list;

}

///

/// 定义用户邮件 标题 内容 Email地址

///

public class UserEmail {

private string title;

private string contents;

public string Contents

{

get { return contents; }

set { contents = value; }

}

private string mailaddres;

public string Mailaddres

{

get { return mailaddres; }

set { mailaddres = value; }

}

public string Title {

get{return title;}

set { title = value; }

}

}

#region 发送邮件

///

/// 发送邮件

///

public void SendEmail(UserEmail user)

{

try

{

LogHelper.SaveNote("进入SendEmail!!!");

//邮件服务器

string smtpserver = GetConfigValue("smtpserver");

//发件人的邮箱名称

string emailuserName = GetConfigValue("emailuserName");

//发件人的邮箱密码

string emailuserpwd = GetConfigValue("emailuserpwd");

//邮箱地址

string emailfrom = GetConfigValue("emailfrom");

int port = Convert.ToInt32(GetConfigValue("serverPort"));

bool f = true;

//是否经过SSL加密

string isSSL = GetConfigValue("SSL");

if (isSSL == "true")

{

f = true;

}

else

{

f = false;

}

LogHelper.SaveNote("发件人的邮箱名称" + emailuserName + "邮件地址(emailFrom)" + emailfrom + "收件人" + user.Mailaddres);

SendEmailToUser(smtpserver, port, f, user.Mailaddres, null, emailuserName, emailuserpwd, emailfrom, user.Title,user.Contents);

LogHelper.SaveNote("Send Mail Success");

}

//获取异常信息

catch (Exception error)

{

//写入异常信息

using (StreamWriter sw = new StreamWriter("F://MailErrorlog.txt", true, System.Text.Encoding.UTF8))

{

sw.WriteLine(DateTime.Now.ToString() + ":");

sw.WriteLine("Exception 异常信息如下.................");

sw.WriteLine(error.ToString());

sw.WriteLine("---------------------------------------------");

sw.Close();

}

}

}

#endregion

#region 利用.Net自带类(SmtpClient) 发送邮件

///

/// 利用.Net自带类(SmtpClient) 发送邮件

///

/// 邮件服务器

/// 用户名(邮箱名称)

/// 密码

/// 是否经过SSL加密

/// 邮件服务器端口(没有加密 一般都是25)

/// 发件人

/// 收件人

/// 主题

/// 内容

/// 发送多人 收件人的邮箱地址以逗号隔开

/// 发送的附件名称 没有附件则为null or ""

public void SendEmailToUser(string stmpserver,int port,bool f, string Mulitaddress, string attachmentName, string username, string pwd, string strfrom, string subject, string body)

{

string ErrorLog = GetConfigValue("ErrorLog");

SmtpClient smtp = new SmtpClient();

//发送邮件的方式

smtp.DeliveryMethod = SmtpDeliveryMethod.Network;

//指定邮件服务器

smtp.Host = stmpserver;

//Gmail QQ stmp ssl加密使用的端口

smtp.Port = port;

smtp.EnableSsl = f; ;//true 经过ssl加密

//验证发件人的身份 用户名(邮件地址和密码)

smtp.Credentials = new System.Net.NetworkCredential(username, pwd);

//初始化信息(来自 接收人)

MailMessage _mailmessage = new MailMessage();

//_mailmessage.To = strto;

//发送多个人 接收人邮件地址以,隔开

_mailmessage.From = new MailAddress(strfrom);

_mailmessage.To.Add(Mulitaddress);

//如果发送失败,SMTP 服务器将发送 失败邮件通知

_mailmessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;

//优先级

_mailmessage.Priority = MailPriority.High;

//发送主题

_mailmessage.Subject = subject;

//有附件则添加附件

if (!string.IsNullOrEmpty(attachmentName))

{

System.Net.Mail.Attachment attch = new System.Net.Mail.Attachment(attachmentName);

_mailmessage.Attachments.Add(attch);

}

//邮件主题编码

_mailmessage.SubjectEncoding = System.Text.Encoding.UTF8;

//指定发送的格式 (Html)

_mailmessage.IsBodyHtml = true;

//指定发送邮件的编码

_mailmessage.BodyEncoding = System.Text.Encoding.UTF8;

//指定邮件内容

_mailmessage.Body = body;

//发送邮件

try

{

smtp.Send(_mailmessage);

}

catch (Exception ex)

{

using (StreamWriter writer = new StreamWriter(ErrorLog+"://MailErrorlog.txt", true, System.Text.Encoding.UTF8))

{

writer.WriteLine("---------------------------------------------");

writer.WriteLine("SendEmail方法发送邮件错误日志................");

writer.WriteLine(ex.ToString());

writer.Flush();

writer.Close();

}

}

}

#endregion

#region 获取邮件配置节点的值

///

/// 加载相应配置文件 并按节点名称获取对应的值

///

/// 当前节点的名称

/// 返回当前节点名称所对应的值

public string GetConfigValue(string target)

{

string configpath=System.Windows.Forms.Application.StartupPath.ToString() + "/Email.config";

return GetConfigValue(configpath, target);

}

///

/// 根据节点名称获取配置文件对应的值(邮件配置信息)

///

/// 配置文件路径

/// 要获取配置节点的名称

/// 返回当前节点名称所对应的值

public string GetConfigValue(string configpath, string target)

{

XmlDocument doc = new XmlDocument();

//加载文件路径s

doc.Load(configpath);

//获取当前节点的根节点

XmlElement root = doc.DocumentElement;

//获取当前节点下所有匹配子节点元素

XmlNodeList xmlnode = root.GetElementsByTagName(target);

//返回值

return xmlnode[0].InnerXml;

}

#endregion

//服务结束

protected override void OnStop()

{

time.Enabled = false;

}

Email.Config如下:

*****

***

****

*****

true

8:53

false

25

1000

0

E

SQLHelper如下:

#region 数据库操作类的封装

public abstract class SqlHelper

{

//Database connection strings

public static readonly string ConnectionStringLocalTransaction = Connstr;

// Hashtable to store cached parameters

private static Hashtable parmCache = Hashtable.Synchronized(new Hashtable());

/*返回数据库连接*/

public static SqlConnection getConnection()

{

SqlConnection c = new SqlConnection(ConnectionStringLocalTransaction);

return c;

}

///

/// Execute a SqlCommand that returns a resultset against the database specified in the connection string

/// using the provided parameters.

///

///

/// e.g.:

/// SqlDataReader r = ExecuteReader(connString, CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24));

///

/// a valid connection string for a SqlConnection

/// the CommandType (stored procedure, text, etc.)

/// the stored procedure name or T-SQL command

/// an array of SqlParamters used to execute the command

/// A SqlDataReader containing the results

public static SqlDataReader ExecuteReader(string connectionString, CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)

{

SqlCommand cmd = new SqlCommand();

SqlConnection conn = new SqlConnection(connectionString);

// we use a try/catch here because if the method throws an exception we want to

// close the connection throw code, because no datareader will exist, hence the

// commandBehaviour.CloseConnection will not work

try

{

PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);

SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

cmd.Parameters.Clear();

return rdr;

}

catch

{

conn.Close();

throw;

}

}

public static DataSet ReturnDataSet(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)

{

SqlCommand cmd = new SqlCommand();

SqlConnection conn = new SqlConnection(ConnectionStringLocalTransaction);

// we use a try/catch here because if the method throws an exception we want to

// close the connection throw code, because no datareader will exist, hence the

// commandBehaviour.CloseConnection will not work

try

{

PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);

DataSet ds = new DataSet();

SqlDataAdapter sda = new SqlDataAdapter(cmd);

sda.Fill(ds);

return ds;

}

catch

{

conn.Close();

throw;

}

}

///

/// Execute a SqlCommand that returns a resultset against the database specified in the connection string

/// using the provided parameters.

///

///

/// e.g.:

/// SqlDataReader r = ExecuteReader(SqlConnection, CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24));

///

/// a valid connection string for a SqlConnection

/// the CommandType (stored procedure, text, etc.)

/// the stored procedure name or T-SQL command

/// an array of SqlParamters used to execute the command

/// A SqlDataReader containing the results

public static SqlDataReader ExecuteReader(SqlConnection conn, CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)

{

SqlCommand cmd = new SqlCommand();

// we use a try/catch here because if the method throws an exception we want to

// close the connection throw code, because no datareader will exist, hence the

// commandBehaviour.CloseConnection will not work

try

{

PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);

SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

cmd.Parameters.Clear();

return rdr;

}

catch

{

conn.Close();

throw;

}

}

///

/// Execute a SqlCommand that returns a resultset against the database specified in the connection string

/// using the provided parameters.

///

///

/// e.g.:

/// SqlDataReader r = ExecuteReader(connString, CommandType.StoredProcedure, "PublishOrders", new SqlParameter("@prodid", 24));

///

/// a valid connection string for a SqlConnection

/// the CommandType (stored procedure, text, etc.)

/// the stored procedure name or T-SQL command

/// an array of SqlParamters used to execute the command

/// A SqlDataReader containing the results

public static SqlDataReader ExecuteReader(CommandType cmdType, string cmdText, params SqlParameter[] commandParameters)

{

SqlCommand cmd = new SqlCommand();

SqlConnection conn = new SqlConnection(ConnectionStringLocalTransaction);

// we use a try/catch here because if the method throws an exception we want to

// close the connection throw code, because no datareader will exist, hence the

// commandBehaviour.CloseConnection will not work

try

{

PrepareCommand(cmd, conn, null, cmdType, cmdText, commandParameters);

SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);

cmd.Parameters.Clear();

return rdr;

}

catch

{

conn.Close();

throw;

}

}

///

/// add parameter array to the cache

///

/// Key to the parameter cache

/// an array of SqlParamters to be cached

public static void CacheParameters(string cacheKey, params SqlParameter[] commandParameters)

{

parmCache[cacheKey] = commandParameters;

}

///

/// Retrieve cached parameters

///

/// key used to lookup parameters

/// Cached SqlParamters array

public static SqlParameter[] GetCachedParameters(string cacheKey)

{

SqlParameter[] cachedParms = (SqlParameter[])parmCache[cacheKey];

if (cachedParms == null)

return null;

SqlParameter[] clonedParms = new SqlParameter[cachedParms.Length];

for (int i = 0, j = cachedParms.Length; i < j; i++)

clonedParms[i] = (SqlParameter)((ICloneable)cachedParms[i]).Clone();

return clonedParms;

}

///

/// Prepare a command for execution

///

/// SqlCommand object

/// SqlConnection object

/// SqlTransaction object

/// Cmd type e.g. stored procedure or text

/// Command text, e.g. Select * from Products

/// SqlParameters to use in the command

private static void PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, CommandType cmdType, string cmdText, SqlParameter[] cmdParms)

{

if (conn.State != ConnectionState.Open)

conn.Open();

cmd.Connection = conn;

cmd.CommandText = cmdText;

if (trans != null)

cmd.Transaction = trans;

cmd.CommandType = cmdType;

if (cmdParms != null)

{

foreach (SqlParameter parm in cmdParms)

cmd.Parameters.Add(parm);

}

}

///

/// 传入输入参数

///

/// 存储过程名称

/// 参数类型

/// 参数大小

/// 参数值

/// 新的 parameter 对象

public static SqlParameter MakeInParam(string ParamName, SqlDbType DbType, int Size, object Value)

{

return MakeParam(ParamName, DbType, Size, ParameterDirection.Input, Value);

}

public void MakeInParam(ref string OldString, string ParamName, SqlDbType DbType, int Size, object Value)

{

OldString = OldString.Replace(ParamName, (string)Value);

}

///

/// 传入返回值参数

///

/// 存储过程名称

/// 参数类型

/// 参数大小

/// 新的 parameter 对象

public static SqlParameter MakeOutParam(string ParamName, SqlDbType DbType, int Size)

{

return MakeParam(ParamName, DbType, Size, ParameterDirection.Output, null);

}

///

/// 传入返回值参数

///

/// 存储过程名称

/// 参数类型

/// 参数大小

/// 新的 parameter 对象

public static SqlParameter MakeReturnParam(string ParamName, SqlDbType DbType, int Size)

{

return MakeParam(ParamName, DbType, Size, ParameterDirection.ReturnValue, null);

}

///

/// 生成存储过程参数

///

/// 存储过程名称

/// 参数类型

/// 参数大小

/// 参数方向

/// 参数值

/// 新的 parameter 对象

public static SqlParameter MakeParam(string ParamName, SqlDbType DbType, Int32 Size, ParameterDirection Direction, object Value)

{

SqlParameter param;

if (Size > 0)

param = new SqlParameter(ParamName, DbType, Size);

else

param = new SqlParameter(ParamName, DbType);

param.Direction = Direction;

if (!(Direction == ParameterDirection.Output && Value == null))

param.Value = Value;

return param;

}

///

/// 创建 SqlCommand 对象实例(用来返回一个整数值)

///

/// 存储过程名

/// 存储过程参数

/// SqlCommand 对象实例

private static SqlCommand BuildIntCommand(SqlConnection connection, string storedProcName, IDataParameter[] parameters)

{

SqlCommand command = BuildQueryCommand(connection, storedProcName, parameters);

command.Parameters.Add(new SqlParameter("ReturnValue",

SqlDbType.Int, 4, ParameterDirection.ReturnValue,

false, 0, 0, string.Empty, DataRowVersion.Default, null));

return command;

}

///

/// 构建 SqlCommand 对象(用来返回一个结果集,而不是一个整数值)

///

/// 数据库连接

/// 存储过程名

/// 存储过程参数

/// SqlCommand

private static SqlCommand BuildQueryCommand(SqlConnection connection, string storedProcName, IDataParameter[] parameters)

{

SqlCommand command = new SqlCommand(storedProcName, connection);

command.CommandType = CommandType.StoredProcedure;

foreach (SqlParameter parameter in parameters)

{

command.Parameters.Add(parameter);

}

return command;

}

#region 执行查询语句 返回dataset

///

/// 执行查询语句,返回DataSet

///

/// 查询语句

/// DataSet

public static DataSet GetDataSet(string cmdText)

{

using (SqlConnection conn = new SqlConnection(ConnectionStringLocalTransaction))

{

SqlCommand sqlcmd = new SqlCommand(cmdText, conn);

sqlcmd.CommandTimeout = 1000;

SqlDataAdapter cmd = new SqlDataAdapter(sqlcmd);

DataSet ds = new DataSet();

try

{

conn.Open();

cmd.Fill(ds, "mydt");

return ds;

}

catch (Exception ex)

{

conn.Close();

cmd.Dispose();

conn.Dispose();

throw new Exception(ex.Message);

}

finally

{

cmd.Dispose();

conn.Close();

conn.Dispose();

}

}

}

#endregion

}

#endregion

将C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/InstallUtil.exe 拷贝到执行的目录Bin Debug文件下 然后注册windows服务

InstallUtil.exe windowservice.exe

卸载windows服务:

InstallUtil.exe -u windowservice.exe

希望本文所述对大家asp.net程序设计有所帮助。

win服务器自动发邮件,asp.net基于windows服务实现定时发送邮件的方法相关推荐

  1. win服务器自动发邮件,windows关机前执行脚本设置与关机blat自动发送邮件脚本模板...

    windows关机前执行脚本设置与关机blat自动发送邮件脚本模板 发布时间:2020-07-25 02:21:24 来源:51CTO 阅读:3093 作者:nn1183 价值:实时掌握开关机记录: ...

  2. 自动发邮件的程序 c语言,C语言实现发送邮件.md

    --- title: C语言实现发送邮件 date: 2019-03-31 11:44:14 tags: socket mathjax: true --- telent模拟发送邮件,并利用C语言进行实 ...

  3. python自动发邮件报554错误_python smtplib使用163发送邮件 报错 554 DT:SPM

    最近想弄个发送邮件的脚本,代码一切正常,执行发送邮件就会报 "554 DT:SPM 发送的邮件内容包含了未被许可的信息,或被系统识别为垃圾邮件.请检查是否有用户发送病毒或者垃圾邮件:&quo ...

  4. ASP实现自动发邮件

    ASP实现自动发邮件代码: 摘录一:  <%@LANGUAGE="VBSCRIPT" %> <% email="www@www.com" tx ...

  5. python脚本自动发邮件功能

    最近给项目加监控,用python写了一个脚本,在出错的时候自动发邮件通知的功能.代码如下 #! /usr/bin/python # -*- coding: utf-8 -*- from smtplib ...

  6. java发邮件_使用MATLAB自动发邮件

    MATLAB作为工程师的得力助手,常被我们誉为万能助手."MATLAB啥都能做,除了生孩子"这种话语常挂在我们嘴边.今天小编就偷偷告诉大家一个使用MATLAB自动发邮件的方法. 在 ...

  7. Linux中使用Msmtp+mutt+shell自动发邮件程序安装说明

    Linux中使用Msmtp+mutt+shell自动发邮件程序安装说明 ------by liyoujia 环境: 需要用到mutt 和 msmtp 这两款软件 Mutt:linux初始化安装的时候自 ...

  8. 发邮件窗体【支持编辑邮件模板,使用wse多线程上传附件及发邮件(带附件)】以及在服务器端自动发邮件...

    这是前段时间做的一个邮件客户端,支持自定义模板(模板是内置的,固定好了)           其中配置模板的xml <?xml version="1.0" encoding= ...

  9. 自动化测试生成HTML测试报告和自动发邮件

    一.生成HTML测试报告 1.下载HTMLTestRunner 地址:http://tungwaiyip.info/software/HTMLTestRunner.html 保存在Python\Lib ...

最新文章

  1. 2018 Google kickstart Problem A. Planet Distance
  2. C++类模板(二)用类模板实现可变长数组
  3. 【牛客NOIP模拟】牛半仙的魔塔(增强版)【贪心】【并查集】
  4. [html] 说说你对abbr标签的理解,它有什么含义?
  5. Selenium with Python 006 - 操作浏览器
  6. 计算机名会影响电脑网络吗,电脑接网线会比连WiFi网速快吗【详细介绍】
  7. dell r740如何做raid_数据存储之七种RAID浅析
  8. HiJson工具 火狐浏览器中的jsonHandle插件(以及乱码问题的解决)--来转换json串的格式
  9. 电阻分压可以当作电源供电吗
  10. Microsoft C++ 异常: std::length_error,位于内存位置 0x000000AF9B7AF810 处
  11. 计算机远程桌面连接连接不上,电脑远程桌面连接不上的解决方法
  12. VUE报错rowserslist: caniuse-lite is outdated. Please run the following command: `npx browser
  13. CSS背景background和显示元素
  14. 华为的冬天 任正非
  15. 利用触发器生成三分频
  16. 专升本英语——语法知识体系(入门部分)
  17. VBS 文本歌词粤语拼音翻译
  18. 什么内网穿透?如何使用内网穿透?
  19. LeetCode 二分查找
  20. 2022汽车驾驶员(高级)考试模拟100题及在线模拟考试

热门文章

  1. 安卓DialogFragment如何使用?
  2. nodejs之处理GET请求
  3. Python 打开目录与指定文件
  4. cdev_init函数
  5. chrome 版本 29.0.1547.76 m 解决打开新标签页后的恶心页面的问题
  6. Linux防火墙配置入门
  7. 在GridView中加入单选按钮RadioButton
  8. 三,springboot集成mybatis
  9. CSS3 Transform变形理解与应用
  10. 艺街开放平台开源计划