Results 1 to 3 of 3

Thread: Send an email

  1. #1

    Thread Starter
    Lively Member Colin Dias's Avatar
    Join Date
    Jan 2008
    Posts
    99

    Send an email

    I have written a DBMS program that has a login screen to access the database.
    It asks for username and password and enters the DB.

    I want to make a provision where if the user forgets his password, the login details (username - password ) are sent to his/her email address .

    It should work like this. The user clicks on a button called "Forgot Password". Then a form opens, with a textbox prompting the user to enter his/her email address. The login details are retrieved and sent to the email at the click of a button called retrieve.

    Below is the code for the login screen . Any help will be appreciated.

    Code:
    Private Sub cmdLogin_Click()
     Dim un As String
     Dim ps As String
     
     adodc1.Refresh
     
     un = Text1.Text  'storing the login and password entered in the variables un and ps
     ps = Text2.Text
     
     Do Until adodc1.Recordset.EOF
     If adodc1.Recordset.Fields("name").Value = un And adodc1.Recordset.Fields("password").Value = ps Then
      mn.Show          'comparing database values with values entered
     login.Hide
     Exit Sub
     
     
     
     
     
     Else
     adodc1.Recordset.MoveNext   'moving to next record on database
     End If
     
     
     
     Loop
     
     Dim msg As String
     
     msg = MsgBox("Username/password mismatch.Passwords are case sensitive! Try Again!", vbOKCancel)
     If (msg = 1) Then          'displays message if login or password
     login.Show                 'is wrong
     
     Text1.Text = ""            'clears the textboxes
     Text2.Text = ""            'reloads login screen
     Text1.SetFocus
     Else
     MsgBox " Thank you for using LussoVoyageur Car rental software", , "Good Bye"
     End
     End If
     
     End Sub
    
    
    
    
    
    
    Private Sub Command1_Click()
    PassEmail.Show
    
    End Sub
    
    Private Sub Form_Resize()
    With Me
    .Width = Screen.Width
    .Height = Screen.Height
    .Top = 0
    .Left = 0
    End With
    
    End Sub

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Send an email

    So, is your basic question: how do I send an email from my application?

  3. #3

    Thread Starter
    Lively Member Colin Dias's Avatar
    Join Date
    Jan 2008
    Posts
    99

    Re: Send an email

    yeah..lol

    But I don't want to open outlook or something. It should send the email internally.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width