Click here to Skip to main content
15,887,812 members
Home / Discussions / C#
   

C#

 
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 
QuestionError converting Int64 to Int32 and vice versa Pin
JoeRip23-Jul-08 18:45
JoeRip23-Jul-08 18:45 
AnswerRe: Error converting Int64 to Int32 and vice versa Pin
half-life23-Jul-08 19:48
half-life23-Jul-08 19:48 
GeneralRe: Error converting Int64 to Int32 and vice versa Pin
JoeRip23-Jul-08 19:57
JoeRip23-Jul-08 19:57 
AnswerRe: Error converting Int64 to Int32 and vice versa Pin
Robert.C.Cartaino24-Jul-08 8:30
Robert.C.Cartaino24-Jul-08 8:30 
GeneralRe: Error converting Int64 to Int32 and vice versa Pin
JoeRip24-Jul-08 10:44
JoeRip24-Jul-08 10:44 
QuestionCan you get the resualt? help me, please! Pin
sgncdc23-Jul-08 17:56
sgncdc23-Jul-08 17:56 
AnswerRe: Can you get the resualt? help me, please! Pin
half-life23-Jul-08 19:41
half-life23-Jul-08 19:41 
AnswerRe: Can you get the resualt? help me, please! Pin
sgncdc23-Jul-08 20:25
sgncdc23-Jul-08 20:25 
GeneralRe: Can you get the resualt? help me, please! Pin
Guffa23-Jul-08 23:18
Guffa23-Jul-08 23:18 
AnswerRe: Can you get the resualt? help me, please! Pin
Christian Graus23-Jul-08 23:41
protectorChristian Graus23-Jul-08 23:41 
QuestionProblems when I update database from a xml file Pin
dienhuflit23-Jul-08 17:51
dienhuflit23-Jul-08 17:51 
AnswerRe: Problems when I update database from a xml file Pin
half-life23-Jul-08 19:57
half-life23-Jul-08 19:57 
GeneralRe: Problems when I update database from a xml file Pin
dienhuflit24-Jul-08 15:23
dienhuflit24-Jul-08 15:23 
QuestionData storage and Uploading file Pin
Banjo Ayorinde23-Jul-08 17:13
Banjo Ayorinde23-Jul-08 17:13 
AnswerRe: Data storage and Uploading file Pin
half-life23-Jul-08 19:53
half-life23-Jul-08 19:53 

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.