Click here to Skip to main content
15,890,186 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Duplicate Objects Pin
Luc Pattyn8-Apr-09 17:57
sitebuilderLuc Pattyn8-Apr-09 17:57 
AnswerRe: Duplicate Objects Pin
Dave Kreskowiak8-Apr-09 17:36
mveDave Kreskowiak8-Apr-09 17:36 
GeneralRe: Duplicate Objects Pin
SeanTWard8-Apr-09 17:58
SeanTWard8-Apr-09 17:58 
GeneralRe: Duplicate Objects Pin
Luc Pattyn8-Apr-09 18:04
sitebuilderLuc Pattyn8-Apr-09 18:04 
GeneralRe: Duplicate Objects Pin
SeanTWard8-Apr-09 18:19
SeanTWard8-Apr-09 18:19 
Questionproblem related to tab control Pin
nazimghori8-Apr-09 16:37
nazimghori8-Apr-09 16:37 
AnswerRe: problem related to tab control Pin
Luc Pattyn8-Apr-09 16:49
sitebuilderLuc Pattyn8-Apr-09 16:49 
QuestionA Return to VB Email Pin
Dalek Dave8-Apr-09 13:20
professionalDalek Dave8-Apr-09 13:20 
OK, I have this.

Imports System.Net.Mail
Public Class Form1


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        SendEmail("Skip")
        
    End Sub
    Sub SendEmail(ByVal name As String)
    
        Dim mail As New MailMessage()
           
        mail.From = New MailAddress("fromaddy@ee.com")
        mail.To.Add("toaddy@ee.com")
        mail.Subject = "Skip hire details"
        mail.Body = "This is a Test"

        Dim smtp As New SmtpClient()
        Try
            smtp.Send(mail)
        Finally
            mail.Dispose()
            smtp = Nothing
        End Try

    End Sub
End Class


It is throwing at the smtp.Send(mail) point.

I am trying to keep it simple and so it lacks all sorts of attachments etc, but I cannot see why it is not working.

This part Dim smtp As New SmtpClient() may be part of the trouble, but surely if it is SmtpClient() it defaults to the local computer's settings?

Any pointers?

------------------------------------

"I am always serious about what I do, not necessarily about how I do it."
Tom Baker

AnswerRe: A Return to VB Email Pin
Dave Kreskowiak8-Apr-09 13:26
mveDave Kreskowiak8-Apr-09 13:26 
GeneralRe: A Return to VB Email Pin
Dalek Dave8-Apr-09 13:50
professionalDalek Dave8-Apr-09 13:50 
GeneralRe: A Return to VB Email Pin
Christian Graus8-Apr-09 14:31
protectorChristian Graus8-Apr-09 14:31 
GeneralRe: A Return to VB Email Pin
Dave Kreskowiak8-Apr-09 17:28
mveDave Kreskowiak8-Apr-09 17:28 
GeneralRe: A Return to VB Email Pin
Dalek Dave8-Apr-09 21:27
professionalDalek Dave8-Apr-09 21:27 
QuestionWhy is this loop intermittently slow? Pin
Steve Faust8-Apr-09 11:56
Steve Faust8-Apr-09 11:56 
AnswerRe: Why is this loop intermittently slow? Pin
Luc Pattyn8-Apr-09 12:40
sitebuilderLuc Pattyn8-Apr-09 12:40 
AnswerRe: Why is this loop intermittently slow? Pin
Dave Kreskowiak8-Apr-09 12:41
mveDave Kreskowiak8-Apr-09 12:41 
GeneralRe: Why is this loop intermittently slow? [modified] Pin
Steve Faust8-Apr-09 12:45
Steve Faust8-Apr-09 12:45 
QuestionSend email in VB Pin
Dalek Dave8-Apr-09 3:50
professionalDalek Dave8-Apr-09 3:50 
AnswerRe: Send email in VB Pin
Dave Kreskowiak8-Apr-09 4:25
mveDave Kreskowiak8-Apr-09 4:25 
AnswerRe: Send email in VB Pin
Jay Royall8-Apr-09 4:27
Jay Royall8-Apr-09 4:27 
QuestionMotion detection VB6 Pin
obi_wan8-Apr-09 1:56
obi_wan8-Apr-09 1:56 
AnswerRe: Motion detection VB6 Pin
EliottA8-Apr-09 3:17
EliottA8-Apr-09 3:17 
AnswerRe: Motion detection VB6 Pin
Dave Kreskowiak8-Apr-09 3:32
mveDave Kreskowiak8-Apr-09 3:32 
Questionhow to add url to vb6.0 desktop application in button click Pin
premprakashbhati8-Apr-09 0:12
premprakashbhati8-Apr-09 0:12 
AnswerRe: how to ask a proper question Pin
Ashfield8-Apr-09 1:30
Ashfield8-Apr-09 1:30 

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.