Click here to Skip to main content
15,923,222 members
Home / Discussions / C#
   

C#

 
GeneralCapturing VB6 event in C#.Net Pin
M A A Mehedi Hasan30-Dec-07 1:17
M A A Mehedi Hasan30-Dec-07 1:17 
GeneralRe: Capturing VB6 event in C#.Net Pin
Michael Sync30-Dec-07 5:35
Michael Sync30-Dec-07 5:35 
GeneralRe: Capturing VB6 event in C#.Net Pin
Paul Conrad30-Dec-07 6:41
professionalPaul Conrad30-Dec-07 6:41 
GeneralRe: Capturing VB6 event in C#.Net Pin
Michael Sync30-Dec-07 19:02
Michael Sync30-Dec-07 19:02 
GeneralRe: Capturing VB6 event in C#.Net Pin
Paul Conrad30-Dec-07 19:06
professionalPaul Conrad30-Dec-07 19:06 
GeneralInvoke function into mail body in an email Pin
zafax_30-Dec-07 0:12
zafax_30-Dec-07 0:12 
GeneralRe: Invoke function into mail body in an email Pin
Paul Conrad30-Dec-07 6:42
professionalPaul Conrad30-Dec-07 6:42 
GeneralRe: Invoke function into mail body in an email Pin
Skippums31-Dec-07 8:09
Skippums31-Dec-07 8:09 
Look into System.Net.Mail (specifically the MailMessage and SmtpClient classes) to send the emails. Also, your method should return the string it is building. Perhaps you should do something like the following (be careful if the file can be large, as it may throw a memory overflow exception)...
private static string ReadText(string fullFilePath) {
    FileStream fs = null;
    StreamReader sr = null;
    try {
        fs = new FileStream(fullFilePath, FileMode.Open, FileAccess.Read);
        sr = new StreamReader(fs);
        return sr.ReadToEnd();
    } finally {
        if (sr != null)
            sr.Close();
        if (fs != null)
            fs.Close();
    }
}
Alternatively, you could send the file as an attachment. Examples of this can be found when you examine the MailMessage class. Hope this helps,

Sounds like somebody's got a case of the Mondays

-Jeff

GeneralRe: Invoke function into mail body in an email Pin
zafax_31-Dec-07 8:14
zafax_31-Dec-07 8:14 
QuestionTransferring arrays from C++ library to C# application Pin
Yooval29-Dec-07 22:28
Yooval29-Dec-07 22:28 
GeneralRe: Transferring arrays from C++ library to C# application Pin
ashukasama31-Dec-07 4:56
ashukasama31-Dec-07 4:56 
Generalinserting image to database sqlserver Pin
yemen_programmer29-Dec-07 19:44
yemen_programmer29-Dec-07 19:44 
GeneralRe: inserting image to database sqlserver Pin
Michael Sync29-Dec-07 22:19
Michael Sync29-Dec-07 22:19 
GeneralArray of objects Pin
eric_tran29-Dec-07 19:27
eric_tran29-Dec-07 19:27 
GeneralRe: Array of objects Pin
Michael Sync29-Dec-07 22:24
Michael Sync29-Dec-07 22:24 
GeneralRe: Array of objects [modified] Pin
eric_tran30-Dec-07 0:07
eric_tran30-Dec-07 0:07 
GeneralRe: Array of objects Pin
Michael Sync30-Dec-07 5:33
Michael Sync30-Dec-07 5:33 
Generalproblem usinf usercontrol object in HTML page Pin
samy10029-Dec-07 14:32
samy10029-Dec-07 14:32 
GeneralRe: problem usinf usercontrol object in HTML page Pin
Michael Sync29-Dec-07 22:27
Michael Sync29-Dec-07 22:27 
AnswerRe: problem usinf usercontrol object in HTML page Pin
dipak.dipak30-Dec-07 2:19
dipak.dipak30-Dec-07 2:19 
GeneralRe: problem usinf usercontrol object in HTML page Pin
samy10030-Dec-07 11:39
samy10030-Dec-07 11:39 
GeneralBinding to a property Pin
peterchen29-Dec-07 14:30
peterchen29-Dec-07 14:30 
GeneralMySql & C# Question ... pulling data Pin
shadowhazard29-Dec-07 9:59
shadowhazard29-Dec-07 9:59 
GeneralRe: MySql & C# Question ... pulling data [modified] Pin
shadowhazard29-Dec-07 11:27
shadowhazard29-Dec-07 11:27 
GeneralRe: MySql & C# Question ... pulling data Pin
Justin Perez29-Dec-07 14:00
Justin Perez29-Dec-07 14:00 

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.