Click here to Skip to main content
14,600,507 members
   

C#

 
QuestionTreeview Control Pin
shehezada7-Jul-08 21:40
Membershehezada7-Jul-08 21:40 
AnswerRe: Treeview Control Pin
Kjetil Svendsen7-Jul-08 23:42
MemberKjetil Svendsen7-Jul-08 23:42 
GeneralRe: Treeview Control Pin
shehezada8-Jul-08 3:29
Membershehezada8-Jul-08 3:29 
GeneralRe: Treeview Control Pin
DaveyM698-Jul-08 4:21
professionalDaveyM698-Jul-08 4:21 
GeneralRe: Treeview Control Pin
Kjetil Svendsen8-Jul-08 21:26
MemberKjetil Svendsen8-Jul-08 21:26 
QuestionSending mail Pin
hadad7-Jul-08 21:35
Memberhadad7-Jul-08 21:35 
AnswerRe: Sending mail Pin
Ashfield7-Jul-08 22:26
MemberAshfield7-Jul-08 22:26 
AnswerRe: Sending mail Pin
Anu Palavila7-Jul-08 22:30
MemberAnu Palavila7-Jul-08 22:30 
include

//---------------------------------------------------------------------------

using System.Web.Mail;
public static string SendMail(int pintUserID, string pstrMailTo, string pstrMailBcc,string pstrMailCc,string pstrMailSubject,string pstrMailBody,string pstrAttachFilePath)

{

try

{
MailMessage objMail = new MailMessage();

objMail.From = System.Configuration.ConfigurationSettings.AppSettings["FromEmailID"];

//objMail.From =System.Web.HttpContext.Current.Session["OfficeEmailID"].ToString() ;

objMail.To = pstrMailTo;

objMail.Bcc = pstrMailBcc;

objMail.Cc = pstrMailCc;

objMail.Subject = pstrMailSubject;
MailAttachment Attachment = null;if (File.Exists(pstrAttachFilePath))

{
Attachment = new MailAttachment(pstrAttachFilePath);

}

objMail.Attachments.Add(Attachment);

SmtpMail.SmtpServer = "localhost";//System.Configuration.ConfigurationSettings.AppSettings["SMTPServerIP"];
SmtpMail.Send(objMail);return "TRUE";

}
catch(Exception Ex)

{
return Ex.Message;

}

}





Config file

<add key="SMTPServerIP" value="192.168.1.11">



call the function SendMail & enable your system SMTP server.

Thanks & Regards

GeneralRe: Sending mail Pin
Simon P Stevens8-Jul-08 1:06
MemberSimon P Stevens8-Jul-08 1:06 
AnswerRe: Sending mail Pin
N a v a n e e t h7-Jul-08 22:48
MemberN a v a n e e t h7-Jul-08 22:48 
Questioncan not obtain local variable value in Visual Studio 2008 Pin
George_George7-Jul-08 21:02
MemberGeorge_George7-Jul-08 21:02 
AnswerRe: can not obtain local variable value in Visual Studio 2008 Pin
leppie7-Jul-08 21:06
Memberleppie7-Jul-08 21:06 
GeneralRe: can not obtain local variable value in Visual Studio 2008 Pin
George_George7-Jul-08 21:28
MemberGeorge_George7-Jul-08 21:28 
GeneralRe: can not obtain local variable value in Visual Studio 2008 Pin
leppie7-Jul-08 21:35
Memberleppie7-Jul-08 21:35 
GeneralRe: can not obtain local variable value in Visual Studio 2008 Pin
George_George7-Jul-08 21:47
MemberGeorge_George7-Jul-08 21:47 
QuestionCheck Channel already registered? Pin
ASysSolvers7-Jul-08 21:02
MemberASysSolvers7-Jul-08 21:02 
QuestionCheck Channel already registered? Pin
ASysSolvers7-Jul-08 21:02
MemberASysSolvers7-Jul-08 21:02 
Questioncreating setup package Pin
Anu Palavila7-Jul-08 20:57
MemberAnu Palavila7-Jul-08 20:57 
QuestionC# / SQL Question - New line in a text field? Pin
Harvey Saayman7-Jul-08 20:54
MemberHarvey Saayman7-Jul-08 20:54 
AnswerRe: C# / SQL Question - New line in a text field? Pin
N a v a n e e t h7-Jul-08 21:37
MemberN a v a n e e t h7-Jul-08 21:37 
GeneralRe: C# / SQL Question - New line in a text field? Pin
Harvey Saayman7-Jul-08 21:47
MemberHarvey Saayman7-Jul-08 21:47 
GeneralRe: C# / SQL Question - New line in a text field? Pin
N a v a n e e t h7-Jul-08 22:47
MemberN a v a n e e t h7-Jul-08 22:47 
QuestionReading values from app.config file [modified] Pin
Tina_K7-Jul-08 20:48
MemberTina_K7-Jul-08 20:48 
AnswerRe: Reading values from app.config file Pin
Harvey Saayman7-Jul-08 20:58
MemberHarvey Saayman7-Jul-08 20:58 
GeneralRe: Reading values from app.config file Pin
Tina_K8-Jul-08 13:22
MemberTina_K8-Jul-08 13:22 

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.