Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    61

    Unanswered: Advice about sending emails

    Hi there,

    I am looking for a little advice. I have a vacation request database that I designed. The database is quite basic and has a table where employees enter the times that they want to take off.

    I am looking for a feature to build into the DB that will warn me when employees have entered time that is waiting for approval. I know that I can use Outlook to send that message, but unfortunately not all PCs will have outlook installed and I am trying to get around the security warnings. I also work in an exchange environment and I have tight rules around security

    Does anybody have any suggestions or examples of what has been used for similar issues?

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I would bypass Outlook and send the e-mail with SMTP.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jul 2004
    Posts
    3
    Quote Originally Posted by mbsmith View Post
    Hi there,

    I am looking for a feature to build into the DB that will warn me when employees have entered time that is waiting for approval. I know that I can use Outlook to send that message, but unfortunately not all PCs will have outlook installed ...
    The larger question first is if you have email installed at all on those PC's in any other form than Outlook. If not, can you install a command line utility ? Another option is for you to write something on your main server that polls the waiting for approvals table periodically and then sends the notification from there where you most likely have some email utility installed on the database. This is assuming that the db in question is not local to the user's workstation.

  4. #4
    Join Date
    Aug 2009
    Posts
    61
    Hi StarTrekker,

    Okay sound I did find this code earlier and tried it. Here is what I have adapted it to.

    Private Sub Command30_Click()

    Dim iCfg As Object
    Dim iMsg As Object

    Set iCfg = CreateObject("CDO.Configuration")
    Set iMsg = CreateObject("CDO.Message")

    With iCfg.Fields
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.server.com"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mbsmith"
    '.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "MyPassordNotAlwaysNeeded"
    .Item("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "mbsmith@ttc.com"
    .Update
    End With

    With iMsg
    .Configuration = iCfg
    .Subject = "Subject"
    .To = "d@ttc.com"
    .TextBody = "Test"
    '.AddAttachment "FullPathToAttachment"
    .Send
    End With

    Set iMsg = Nothing
    Set iCfg = Nothing

    End Sub
    When click my button to run the code, it tells me that the receipient is not recognized. I have changed the address in this post, but have it correct in the code.

    When I debug it highlights the .send. Any ideas? Do I need to chnage the smpt server name to something?

Posting Permissions

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