Click here to Skip to main content
15,922,139 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how 2 use notepad store info(vb.net) Pin
mayhem_rules22-Feb-06 17:11
mayhem_rules22-Feb-06 17:11 
GeneralRe: how 2 use notepad store info(vb.net) Pin
Dave Kreskowiak23-Feb-06 3:16
mveDave Kreskowiak23-Feb-06 3:16 
QuestionPrevent click on datagrid with setting Enable = false Pin
nzmike22-Feb-06 14:11
nzmike22-Feb-06 14:11 
AnswerRe: Prevent click on datagrid with setting Enable = false Pin
Dean_SF24-Feb-06 9:43
Dean_SF24-Feb-06 9:43 
GeneralRe: Prevent click on datagrid with setting Enable = false Pin
nzmike26-Feb-06 10:34
nzmike26-Feb-06 10:34 
Question[Message Deleted] Pin
Tyrone_whitey22-Feb-06 12:26
Tyrone_whitey22-Feb-06 12:26 
AnswerRe: Help with Splash Screens Pin
Joshua Quick22-Feb-06 12:42
Joshua Quick22-Feb-06 12:42 
QuestionEmail will not send my visual studio 2003 project Pin
kenn_rosie22-Feb-06 11:54
kenn_rosie22-Feb-06 11:54 
Email will not send my visual studio 2003 project

1. I am using MSDE, IIS, Visual studio 2003, 1.1 netframework, I have mail Outlook and msn homail,

2. these are installed on windows xp

3. Can I send email if I only have msde and not a regular server?

4. The project works except the sending of the email

5. I thought I have coded below correctly, but I do not receive emails

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)

' Fires when the application is started

'1. Create a connection

Dim myConnection As New SqlConnection(ConfigurationSettings.AppSettings("connectionString"))

myConnection.Open()

'2. Create the command object, for the query

Const strSQL As String = "Select LastUpdated, ProductId from products "

Dim objCmd As New SqlCommand(strSQL, myConnection)

Dim objDR As SqlDataReader

Dim att

objDR = objCmd.ExecuteReader()

While (objDR.Read)

If (Not (objDR("LastUpdated") Is DBNull.Value)) Then

If (Date.Compare(objDR("LastUpdated"), Today.Date) = 0) Then

Dim newMail As New MailMessage

newMail.From = "from@from.com" '' this is the From Address

newMail.To = "kenn_rosie@msn.com" '' this is TO Address

'newMail.Cc = "hadeedian@hotmail.com" '' this is TO Address

newMail.Subject = "Change in Product Rate"

newMail.Body = " Dear Ken, " & "Please review attached email for product ID: " & objDR("ProductID") & "Thank you," & "Kenn()"

att = New MailAttachment("C:\Inetpub\wwwroot\GrocerToGo\Product_Changed.doc")

newMail.Attachments.Add(att)

newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")

newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "username")

newMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password")

SmtpMail.SmtpServer = "mailserver"

SmtpMail.Send(newMail)

End If

End If

End While

myConnection.Close() 'Close the connection

End Sub
AnswerRe: Email will not send my visual studio 2003 project Pin
japel22-Feb-06 12:45
japel22-Feb-06 12:45 
JokeRe: Email will not send my visual studio 2003 project TESTED Pin
japel22-Feb-06 13:52
japel22-Feb-06 13:52 
Questionaccessing to crystal report parts ... Pin
microuser_200022-Feb-06 11:18
microuser_200022-Feb-06 11:18 
QuestionNotify Parent Form of close Pin
K. Shaffer22-Feb-06 9:35
K. Shaffer22-Feb-06 9:35 
AnswerRe: Notify Parent Form of close Pin
Joshua Quick22-Feb-06 12:30
Joshua Quick22-Feb-06 12:30 
GeneralRe: Notify Parent Form of close Pin
K. Shaffer23-Feb-06 4:31
K. Shaffer23-Feb-06 4:31 
QuestionToolstrip/Menustrip Pin
kenexcelon22-Feb-06 9:27
kenexcelon22-Feb-06 9:27 
AnswerRe: Toolstrip/Menustrip Pin
RichardBerry23-Feb-06 0:12
RichardBerry23-Feb-06 0:12 
QuestionWindows Application type or Console Application type? Pin
Slow Learner22-Feb-06 9:13
Slow Learner22-Feb-06 9:13 
AnswerRe: Windows Application type or Console Application type? Pin
Joshua Quick22-Feb-06 12:47
Joshua Quick22-Feb-06 12:47 
QuestionFilter data in DataGridView Pin
Brian Holdridge22-Feb-06 9:00
Brian Holdridge22-Feb-06 9:00 
AnswerRe: Filter data in DataGridView Pin
RichardBerry22-Feb-06 22:38
RichardBerry22-Feb-06 22:38 
GeneralRe: Filter data in DataGridView Pin
Brian Holdridge24-Feb-06 2:34
Brian Holdridge24-Feb-06 2:34 
QuestionPassing object from one form to another Pin
G7236022-Feb-06 8:52
G7236022-Feb-06 8:52 
AnswerRe: Passing object from one form to another Pin
Joshua Quick22-Feb-06 13:09
Joshua Quick22-Feb-06 13:09 
QuestionDatagrids and the Date....... Pin
daviiie22-Feb-06 6:34
daviiie22-Feb-06 6:34 
AnswerRe: Datagrids and the Date....... Pin
RichardBerry22-Feb-06 20:59
RichardBerry22-Feb-06 20:59 

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.