Click here to Skip to main content
15,890,282 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDevExpress Grid Pin
basitsar14-Jul-12 4:56
basitsar14-Jul-12 4:56 
AnswerRe: DevExpress Grid Pin
Sandeep Mewara14-Jul-12 21:50
mveSandeep Mewara14-Jul-12 21:50 
QuestionValidation Expression Question Pin
Jassim Rahma14-Jul-12 1:45
Jassim Rahma14-Jul-12 1:45 
AnswerRe: Validation Expression Question Pin
Sandeep Mewara14-Jul-12 21:52
mveSandeep Mewara14-Jul-12 21:52 
GeneralSEND MAIL Pin
laxman sindh13-Jul-12 20:21
laxman sindh13-Jul-12 20:21 
GeneralRe: SEND MAIL Pin
Richard MacCutchan13-Jul-12 22:51
mveRichard MacCutchan13-Jul-12 22:51 
AnswerRe: SEND MAIL Pin
Sandeep Mewara14-Jul-12 22:01
mveSandeep Mewara14-Jul-12 22:01 
GeneralRe: SEND MAIL Pin
wikizhao15-Jul-12 16:25
wikizhao15-Jul-12 16:25 
this code have some chinese,if you know

#region :Send Email
///
/// Send Email(Success return true, faile retuan false)
///

/// <param name="strBody" />content
/// <param name="strSubject" />theme
/// <param name="strFrom" />send email
/// <param name="strFromPwd" />send keys/param>
/// <param name="strTo" />get email
/// <returns>Success return true, faile retuan false
public static bool SendMail(string strBody, string strSubject, string strFrom, string strFromPwd, string strTo, string strSmtp)
{
bool b = false;

// 邮件信息(属性)
MailMessage mm = new MailMessage();

mm.From = new MailAddress(strFrom);
mm.Subject = strSubject;
mm.SubjectEncoding = Encoding.UTF8;
mm.Body = strBody;
mm.BodyEncoding = Encoding.UTF8;
mm.IsBodyHtml = true;
mm.Priority = MailPriority.Normal;

//// 获取 SMTP 服务器
//string Smtp = string.Empty; // smtp 地址
//// 取得后部分的 smtp地址
//string strSmtp = strFrom.Substring((strFrom.IndexOf("@") + 1));
//Smtp = "smtp." + strSmtp;

// 发送邮件
SmtpClient sc = new SmtpClient(strSmtp);
// 用户凭证 (email 地址和密码)
sc.Credentials = new NetworkCredential(strFrom, strFromPwd);

if (strSmtp == "gmail.com")
{
sc.EnableSsl = true;
}
sc.Timeout = 5000;

mm.To.Clear();
mm.To.Add(strTo);
try
{
sc.Send(mm);
b = true;
}
catch (ArgumentNullException ex)
{
b = false;
}
catch (SmtpException smtpEx)
{
b = false;
}
catch
{
b = false;
}
// 释放资源
mm.Dispose();

return b;
}
#endregion
AnswerRe: SEND MAIL Pin
Dhyanga17-Jul-12 10:32
Dhyanga17-Jul-12 10:32 
QuestionDevelop Enterpise Applicattions with ASP.NET Pin
Phatinox13-Jul-12 2:08
Phatinox13-Jul-12 2:08 
AnswerRe: Develop Enterpise Applicattions with ASP.NET Pin
David Mujica13-Jul-12 2:27
David Mujica13-Jul-12 2:27 
AnswerRe: Develop Enterpise Applicattions with ASP.NET Pin
Member 771364713-Jul-12 2:54
Member 771364713-Jul-12 2:54 
GeneralRe: Develop Enterpise Applicattions with ASP.NET Pin
Phatinox13-Jul-12 3:10
Phatinox13-Jul-12 3:10 
AnswerRe: Develop Enterpise Applicattions with ASP.NET Pin
wikizhao15-Jul-12 16:29
wikizhao15-Jul-12 16:29 
Questioncannot convert dataview t0 dataset Pin
sumeet kumar Attri12-Jul-12 21:13
sumeet kumar Attri12-Jul-12 21:13 
AnswerRe: cannot convert dataview t0 dataset Pin
Sandeep Mewara12-Jul-12 23:04
mveSandeep Mewara12-Jul-12 23:04 
QuestionFormView/ObjectDataSource Insert Problem Pin
Darren Dickerson12-Jul-12 5:36
Darren Dickerson12-Jul-12 5:36 
Questionload pages from database Pin
abdulwahed sallam11-Jul-12 23:10
abdulwahed sallam11-Jul-12 23:10 
AnswerRe: load pages from database Pin
R. Giskard Reventlov12-Jul-12 5:53
R. Giskard Reventlov12-Jul-12 5:53 
AnswerRe: load pages from database Pin
Sandeep Mewara12-Jul-12 9:37
mveSandeep Mewara12-Jul-12 9:37 
Generalhow to solve the ScriptResource.axd exception problem? Pin
mohammad ehsan11-Jul-12 21:13
mohammad ehsan11-Jul-12 21:13 
GeneralRe: how to solve the ScriptResource.axd exception problem? Pin
Parwej Ahamad12-Jul-12 2:14
professionalParwej Ahamad12-Jul-12 2:14 
GeneralRe: how to solve the ScriptResource.axd exception problem? Pin
KSaiPrasad12-Jul-12 3:28
KSaiPrasad12-Jul-12 3:28 
GeneralRe: how to solve the ScriptResource.axd exception problem? Pin
PIEBALDconsult12-Jul-12 3:59
mvePIEBALDconsult12-Jul-12 3:59 
Questionweb app places you on logon page after 3 minutes Pin
dcof11-Jul-12 12:21
dcof11-Jul-12 12:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.