Click here to Skip to main content
16,011,170 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DataGridView Parent/Child Pin
alwinSCH25-Oct-07 20:56
alwinSCH25-Oct-07 20:56 
QuestionTry Catch inside of functions Pin
barney_197224-Oct-07 3:28
barney_197224-Oct-07 3:28 
AnswerRe: Try Catch inside of functions Pin
Tamimi - Code24-Oct-07 3:48
Tamimi - Code24-Oct-07 3:48 
AnswerRe: Try Catch inside of functions Pin
SHatchard24-Oct-07 3:52
SHatchard24-Oct-07 3:52 
AnswerRe: Try Catch inside of functions Pin
barney_197224-Oct-07 4:16
barney_197224-Oct-07 4:16 
AnswerRe: Try Catch inside of functions Pin
Dave Kreskowiak24-Oct-07 6:29
mveDave Kreskowiak24-Oct-07 6:29 
Questionhow to make my code send an email Pin
Knowledgestudent24-Oct-07 3:26
Knowledgestudent24-Oct-07 3:26 
AnswerRe: how to make my code send an email Pin
Tom Deketelaere24-Oct-07 4:44
professionalTom Deketelaere24-Oct-07 4:44 
the following code should work

Imports System.web.Mail
Imports System.Web

Private Sub sendmail()
        Dim attch As ArrayList = Nothing
        Dim myMessage As MailMessage
        Try
            myMessage = New MailMessage()
            With myMessage
                .To = ' INSERT adress to who to send
                .From = 'INSERT From wich adress to send
                .Subject = 'INSERT subject
                Dim text As String = System.Text.RegularExpressions.Regex.Replace(txtbody.Text, "\n", "<br>") 
                .Body = text
                .BodyFormat = MailFormat.Html
                '.Cc = CC
                '.Bcc = BCC
                If Not attch Is Nothing Then
                    For i = 0 To attch.Count - 1
                        If FileExists(attch(i)) Then
                            Dim s As New System.Web.Mail.MailAttachment(attch(i))
                            .Attachments.Add(s)
                        End If
                    Next
                End If
            End With
            SmtpMail.SmtpServer = 'INSERT smtp server here
            SmtpMail.Send(myMessage)
        Catch myexp As Exception
            ' Throw myexp
        End Try
end sub


hope this helps



If my help was helpfull let me know, if not let me know why.

The only way we learn is by making mistakes.

GeneralRe: how to make my code send an email Pin
Dave Kreskowiak24-Oct-07 6:25
mveDave Kreskowiak24-Oct-07 6:25 
GeneralRe: how to make my code send an email [modified] Pin
Tom Deketelaere24-Oct-07 21:19
professionalTom Deketelaere24-Oct-07 21:19 
GeneralRe: how to make my code send an email Pin
Dave Kreskowiak25-Oct-07 1:48
mveDave Kreskowiak25-Oct-07 1:48 
GeneralRe: how to make my code send an email Pin
Tom Deketelaere25-Oct-07 2:33
professionalTom Deketelaere25-Oct-07 2:33 
GeneralRe: how to make my code send an email Pin
Knowledgestudent25-Oct-07 2:57
Knowledgestudent25-Oct-07 2:57 
Questionhow to create and use class Pin
Knowledgestudent24-Oct-07 3:03
Knowledgestudent24-Oct-07 3:03 
AnswerRe: how to create and use class Pin
Dave Kreskowiak24-Oct-07 6:22
mveDave Kreskowiak24-Oct-07 6:22 
QuestionHow to use Enter key to Select an Option without using a Mouse Pin
Vimalsoft(Pty) Ltd24-Oct-07 2:56
professionalVimalsoft(Pty) Ltd24-Oct-07 2:56 
AnswerRe: How to use Enter key to Select an Option without using a Mouse Pin
The ANZAC24-Oct-07 2:59
The ANZAC24-Oct-07 2:59 
GeneralRe: How to use Enter key to Select an Option without using a Mouse Pin
Vimalsoft(Pty) Ltd24-Oct-07 3:22
professionalVimalsoft(Pty) Ltd24-Oct-07 3:22 
GeneralRe: How to use Enter key to Select an Option without using a Mouse Pin
The ANZAC24-Oct-07 3:25
The ANZAC24-Oct-07 3:25 
AnswerRe: How to use Enter key to Select an Option without using a Mouse Pin
SHatchard24-Oct-07 3:01
SHatchard24-Oct-07 3:01 
GeneralRe: How to use Enter key to Select an Option without using a Mouse Pin
The ANZAC24-Oct-07 3:06
The ANZAC24-Oct-07 3:06 
AnswerRe: How to use Enter key to Select an Option without using a Mouse [modified] Pin
Vimalsoft(Pty) Ltd24-Oct-07 3:37
professionalVimalsoft(Pty) Ltd24-Oct-07 3:37 
QuestionNeed a New Tool Bar Pin
kolag24-Oct-07 1:49
kolag24-Oct-07 1:49 
AnswerRe: Need a New Tool Bar Pin
The ANZAC24-Oct-07 2:52
The ANZAC24-Oct-07 2:52 
GeneralRe: Need a New Tool Bar Pin
kolag28-Oct-07 22:24
kolag28-Oct-07 22:24 

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.