Click here to Skip to main content
15,905,136 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Windows Forms Unhandled-Exception Dialog Pin
Abhinav S12-Apr-10 20:02
Abhinav S12-Apr-10 20:02 
GeneralRe: Windows Forms Unhandled-Exception Dialog Pin
souren7712-Apr-10 23:48
souren7712-Apr-10 23:48 
QuestionDLL Pin
geeeeeeeetha12-Apr-10 2:12
geeeeeeeetha12-Apr-10 2:12 
AnswerRe: DLL Pin
Rajesh Anuhya12-Apr-10 2:17
professionalRajesh Anuhya12-Apr-10 2:17 
AnswerRe: DLL Pin
dan!sh 12-Apr-10 2:47
professional dan!sh 12-Apr-10 2:47 
AnswerRe: DLL Pin
Dave Kreskowiak12-Apr-10 4:09
mveDave Kreskowiak12-Apr-10 4:09 
AnswerRe: DLL Pin
Gabriel Szabo14-Apr-10 5:07
Gabriel Szabo14-Apr-10 5:07 
QuestionAttaching a file to generated email Pin
nhsal6912-Apr-10 1:27
nhsal6912-Apr-10 1:27 
Hi All,

I've got the following code, which runs an exe with some switches and then sends the log file to me, or at least it's supposed to.

I receive the email ok, but no attachment.. the code compiles fine..

has anyone any ideas??

<br />
        MyProcess.StartInfo.FileName = "printmig.exe"<br />
        MyProcess.StartInfo.WorkingDirectory = "c:\print backup"<br />
        MyProcess.StartInfo.Arguments = "printmig.exe /b /i"<br />
        MyProcess.Start()<br />
<br />
        MyProcess.WaitForExit()<br />
<br />
<br />
        Dim objMail As New System.Net.Mail.MailMessage()<br />
        Dim obj As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient<br />
        Dim Mailmsg As New System.Net.Mail.MailMessage<br />
        Mailmsg.To.Clear()<br />
        Mailmsg.To.Add(New System.Net.Mail.MailAddress("receivers address"))<br />
        Mailmsg.From = New System.Net.Mail.MailAddress("senders address")<br />
        Mailmsg.Subject = "(subject text)"<br />
<br />
        Dim attachment As New System.Net.Mail.Attachment("C:\file.log") 'create the attachment<br />
        objMail.Attachments.Add(attachment) 'add the attachment<br />
<br />
<br />
        Try<br />
            Mailmsg.Body = ""<br />
            obj.Host = "external smtp server" ' Modify to YOUR smtp server<br />
            obj.Send(Mailmsg)<br />
        Catch ex As Exception<br />
            Write("Error: " & ex.ToString())<br />
<br />


Cheers
nhsal69
AnswerRe: Attaching a file to generated email Pin
Not Active12-Apr-10 2:13
mentorNot Active12-Apr-10 2:13 
AnswerRe: Attaching a file to generated email Pin
Rajesh Anuhya12-Apr-10 2:19
professionalRajesh Anuhya12-Apr-10 2:19 
GeneralRe: Attaching a file to generated email Pin
nhsal6912-Apr-10 2:58
nhsal6912-Apr-10 2:58 
QuestionC# or VB.net Compatible Data types with Delphi Data Types Pin
vijay.victory12-Apr-10 0:41
vijay.victory12-Apr-10 0:41 
Questionhow to view webcam in Visual Studio 2005 please? Pin
ugasciny11-Apr-10 7:38
ugasciny11-Apr-10 7:38 
AnswerRe: how to view webcam in Visual Studio 2005 please? Pin
Som Shekhar11-Apr-10 8:29
Som Shekhar11-Apr-10 8:29 
GeneralRe: how to view webcam in Visual Studio 2005 please? Pin
ugasciny11-Apr-10 9:51
ugasciny11-Apr-10 9:51 
GeneralRe: how to view webcam in Visual Studio 2005 please? Pin
Som Shekhar11-Apr-10 10:02
Som Shekhar11-Apr-10 10:02 
GeneralRe: how to view webcam in Visual Studio 2005 please? Pin
Som Shekhar11-Apr-10 10:03
Som Shekhar11-Apr-10 10:03 
GeneralRe: how to view webcam in Visual Studio 2005 please? Pin
ugasciny11-Apr-10 14:19
ugasciny11-Apr-10 14:19 
QuestionCutom Control painted with GDI - Controls added or painted Pin
norrisMiou10-Apr-10 1:30
norrisMiou10-Apr-10 1:30 
AnswerRe: Cutom Control painted with GDI - Controls added or painted Pin
Luc Pattyn10-Apr-10 1:40
sitebuilderLuc Pattyn10-Apr-10 1:40 
AnswerRe: Cutom Control painted with GDI - Controls added or painted Pin
Mr.PoorEnglish10-Apr-10 4:52
Mr.PoorEnglish10-Apr-10 4:52 
AnswerRe: Cutom Control painted with GDI - Controls added or painted [modified] Pin
norrisMiou10-Apr-10 10:36
norrisMiou10-Apr-10 10:36 
QuestionHow can I examine text with textbox to show keywordswords? Pin
shelle858-Apr-10 7:26
shelle858-Apr-10 7:26 
AnswerRe: How can I examine text with textbox to show keywordswords? Pin
Abhinav S8-Apr-10 8:02
Abhinav S8-Apr-10 8:02 
AnswerRe: How can I examine text with textbox to show keywordswords? Pin
Sandesh M Patil9-Apr-10 4:01
Sandesh M Patil9-Apr-10 4:01 

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.