資源簡介
c# 發送郵件示例代碼
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.UI;
using?System.Web.UI.WebControls;
public?partial?class?login?:?System.Web.UI.Page
{
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????}
????protected?void?BtnMail_Click(object?sender?EventArgs?e)
????{
????????bool?flag?=?MailHelper.SendEmail(txtmailTo.Text.Trim()txtmailSubject.Text.Trim()txtmailContent.Text.Trim());
????????if?(flag)
????????{
????????????Page.Clientscript.RegisterClientscriptBlock(Page.Clientscript.GetType()?“myscripts“?“ript>alert(\“發送成功!\“); ript>“);
????????}
????????else
????????{
????????????Page.Clientscript.RegisterClientscriptBlock(Page.Clientscript.GetType()?“myscripts“?“ript>alert(\“發送失敗!\“); ript>“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7755??2012-06-05?17:32??發送電子郵件\SendEmail\App_Code\EmailHelper.cs
?????文件??????11970??2012-06-05?17:38??發送電子郵件\SendEmail\App_Code\Mail.cs
?????文件???????1990??2015-01-13?18:47??發送電子郵件\SendEmail\App_Code\MailHelper.cs
?????文件???????6410??2011-10-26?11:07??發送電子郵件\SendEmail\App_Code\MailSender.cs
?????文件??????31701??2011-11-07?14:44??發送電子郵件\SendEmail\App_Code\SmtpServerHelper.cs
?????文件???????1042??2012-06-05?17:28??發送電子郵件\SendEmail\login.aspx
?????文件????????842??2012-06-05?17:29??發送電子郵件\SendEmail\login.aspx.cs
?????文件????????657??2015-01-13?18:43??發送電子郵件\SendEmail\web.config
?????文件?????????92??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\AspFileDataCache.dat
?????文件??????????4??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\Buildsc
?????文件??????????4??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\Buildsc
?????文件??????????4??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\ConditionalNames\.crc
?????文件??????????4??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\ConditionalNames\.version
?????文件????????648??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\ConditionalNames\1\293bc1ba.dat
?????文件??????????4??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\ja
?????文件??????????4??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\ja
?????文件??????52657??2015-01-13?18:34??發送電子郵件\_ReSharper.發送電子郵件\ja
?????文件?????????59??2015-01-13?18:02??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\Assembly.Location.txt
?????文件??????31389??2015-01-13?18:02??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\t\System\Net\Mail\SmtpClient.cs
?????文件????????118??2015-01-13?18:02??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\t\System\Net\Mail\SmtpClient.cs.flags
?????文件????????567??2015-01-13?18:02??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\t\System\Net\Mail\SmtpClient.cs.info
?????文件????????369??2015-01-13?18:22??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\t\System\Net\Mail\SmtpDeliveryMethod.cs
?????文件????????118??2015-01-13?18:22??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\t\System\Net\Mail\SmtpDeliveryMethod.cs.flags
?????文件????????567??2015-01-13?18:22??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System-7b28\t\System\Net\Mail\SmtpDeliveryMethod.cs.info
?????文件?????????73??2015-01-13?18:21??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System.Configuration-7b55\Assembly.Location.txt
?????文件???????9188??2015-01-13?18:21??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System.Configuration-7b55\t\System\Configuration\ConfigurationManager.cs
?????文件????????118??2015-01-13?18:21??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System.Configuration-7b55\t\System\Configuration\ConfigurationManager.cs.flags
?????文件????????704??2015-01-13?18:21??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System.Configuration-7b55\t\System\Configuration\ConfigurationManager.cs.info
?????文件?????????63??2015-01-13?17:51??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System.Web-ef05\Assembly.Location.txt
?????文件??????46840??2015-01-13?17:51??發送電子郵件\_ReSharper.發送電子郵件\JbDecompilerCache\decompiler\System.Web-ef05\t\System\Web\UI\Clientsc
............此處省略305個文件信息
- 上一篇:C#web斷點續傳
- 下一篇:c# 透明panel
評論
共有 條評論