我爱Aspx >> Asp.Net >> c# 支持SMTP服务器认证的邮件发送类/// <summary>
/// 邮件服务器域名
/// </summary>
private string mailserver="";
/// <summary>
/// 邮件服务器域名和验证信息
/// 形如:"user:pass@www.server.com:25",也可省略次要信息。如"user:pass@www.server.com"或"www.server.com"
/// </summary>
public string MailDomain
{
set
{
string maidomain=value.Trim();
int tempint;
if(maidomain!="")
{
tempint=maidomain.IndexOf("@");
if(tempint!=-1)
{
string up=maidomain.Substring(0,tempint);
MailServerUserName=up.Substring(0,up.IndexOf(":"));
MailServerPassWord=up.Substring(up.IndexOf(":")+1,up.Length-up.IndexOf(":")-1);
string ms=maidomain.Substring(tempint+1,maidomain.Length-tempint-1);
tempint=ms.IndexOf(":");
if(tempint!=-1)
{
mailserver=ms.Substring(0,tempint);
mailserverport=System.Convert.ToInt32(ms.Substring(tempint+1,ms.Length-tempint-1));
Ҷƪл˵?
C# 格式化字符串 String.Format[05-20]
C# 格式化字符串 String.Format[05-20]
C#实现控件数组[05-20]
用C#读取图片的EXIF信息的方法[05-20]
用Visual C#实现文件下载[05-20]
使用C#调用外部Ping命令获取网络..[05-20]
使用C#控制远程计算机的服务[05-20]
使用C#编写的一个定时关机程序[05-20]
C#处理鼠标和键盘事件[05-20]
使用C#实现阿拉伯数字到大写中文..[05-20]
加固Windows Server 2003 IIS 服..[05-20]
C# 格式化字符串 String.Format[05-20]
C# 格式化字符串 String.Format[05-20]
Session 详解[05-20]
Session 详解[05-20]
背投广告代码[05-20]
ArrayList的使用方法[05-20]
ArrayList的使用方法[05-20]
使用 HttpContext.RewritePath[05-20]
使用 HttpContext.RewritePath[05-20]