Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
AnswerRe: unable to kill com object Pin
stancrm24-Jul-08 2:48
stancrm24-Jul-08 2:48 
AnswerRe: unable to kill com object Pin
JoeRip24-Jul-08 10:54
JoeRip24-Jul-08 10:54 
GeneralRe: unable to kill com object Pin
JoeRip24-Jul-08 12:16
JoeRip24-Jul-08 12:16 
QuestionIs DBF table ANSI? Pin
JoZ CaVaLLo23-Jul-08 21:42
JoZ CaVaLLo23-Jul-08 21:42 
AnswerRe: Is DBF table ANSI? Pin
Guffa23-Jul-08 23:22
Guffa23-Jul-08 23:22 
GeneralRe: Is DBF table ANSI? Pin
JoZ CaVaLLo23-Jul-08 23:35
JoZ CaVaLLo23-Jul-08 23:35 
Questionprint a forms textbox data with out its background [modified] Pin
Anu Palavila23-Jul-08 21:31
Anu Palavila23-Jul-08 21:31 
AnswerRe: print a forms textbox data with out its background Pin
teejayem24-Jul-08 2:30
teejayem24-Jul-08 2:30 
QuestionCan't find PInvoke DLL 'dbnetlib.dll Pin
harcaype23-Jul-08 21:21
harcaype23-Jul-08 21:21 
AnswerRe: Can't find PInvoke DLL 'dbnetlib.dll Pin
Christian Graus23-Jul-08 23:39
protectorChristian Graus23-Jul-08 23:39 
AnswerRe: Can't find PInvoke DLL 'dbnetlib.dll Pin
harcaype24-Jul-08 2:01
harcaype24-Jul-08 2:01 
Questioncalling c# library in java through JNI Pin
kapilbansal8923-Jul-08 20:39
kapilbansal8923-Jul-08 20:39 
QuestionOnBeforeInstall and OnAfterInstall Events of the Configuration.Install.Installer class are not raised Pin
Shrikant Gujar23-Jul-08 20:15
Shrikant Gujar23-Jul-08 20:15 
AnswerRe: OnBeforeInstall and OnAfterInstall Events of the Configuration.Install.Installer class are not raised Pin
Eduard Keilholz24-Jul-08 1:02
Eduard Keilholz24-Jul-08 1:02 
Questioniterating in excel sheet Pin
Mogaambo23-Jul-08 19:58
Mogaambo23-Jul-08 19:58 
AnswerRe: iterating in excel sheet Pin
Jimmanuel24-Jul-08 3:19
Jimmanuel24-Jul-08 3:19 
Questionc# Pin
lankaudaranga23-Jul-08 19:07
lankaudaranga23-Jul-08 19:07 
AnswerRe: c# PinPopular
Christian Graus23-Jul-08 23:40
protectorChristian Graus23-Jul-08 23:40 
AnswerRe: c# Pin
Paul Conrad27-Jul-08 19:09
professionalPaul Conrad27-Jul-08 19:09 
QuestionSize of attachments to mail send? Pin
Member 387988123-Jul-08 19:05
Member 387988123-Jul-08 19:05 
AnswerRe: Size of attachments to mail send? Pin
stancrm23-Jul-08 19:26
stancrm23-Jul-08 19:26 
AnswerRe: Size of attachments to mail send? Pin
N a v a n e e t h23-Jul-08 19:35
N a v a n e e t h23-Jul-08 19:35 
GeneralRe: Size of attachments to mail send? Pin
Member 387988123-Jul-08 20:06
Member 387988123-Jul-08 20:06 
Hi i am sending mail to different ids...,
Everything going on well....,

I am going to make this application to exe and put it in schedular task...,
This things will execute automatically...,

Now my probs is suppose mailserver is down...,
Then it will be probs in mailsend...,

So in that case how to handle the code.., it mean if the mailserver will down or mail didnt send properly...,

Then it have to be fire again, after some minutes or some other condition have to do how to do that?

This is my code:

DirectoryInfo dInfo = new DirectoryInfo(mypath);
DirectoryInfo[] dInfos = dInfo.GetDirectories();
foreach (DirectoryInfo d in dInfos)
{
MailMessage mailMessage = new MailMessage();
MailAttachment attach = null;

mailMessage.From = "Magesh@Test.com";
mailMessage.To = d.Name;
mailMessage.Subject = "Hi";
//mailMessage.Body = "Hi This One Is For Testing
FileInfo[] fInfos = d.GetFiles();
foreach (FileInfo f in fInfos)
{
attach = new MailAttachment(f.FullName);
mailMessage.Attachments.Add(attach);
}
SmtpMail.Send(mailMessage);

mailMessage.To = "";
attach = null;
}

Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
GeneralRe: Size of attachments to mail send? Pin
N a v a n e e t h23-Jul-08 20:33
N a v a n e e t h23-Jul-08 20:33 
GeneralRe: Size of attachments to mail send? Pin
Member 387988123-Jul-08 20:44
Member 387988123-Jul-08 20:44 

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.