Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2012
    Posts
    5

    Unanswered: Sending Automated Emails from my database

    I have created a database that I am using to track and assign to a person on the team in one of the forms. I would like to have an automated email sent to the person that I select in my Combobox.

    For example, I select John Smith in the assigned to combobox, I want it to look up the email address to that person and say there was a new assigned for them in the database and a couple of the fields.

    could someone help me? I am trying to impress my contract employer so I can get a permanent job. Thank you!!!

  2. #2
    Join Date
    May 2005
    Posts
    119
    For clarification purposes, are you asking how to send an email or asking how to look up an email address in the Exchange GAL (assuming you're using Exchange) or both?

  3. #3
    Join Date
    Aug 2012
    Posts
    5
    I would like to send an email notification to the users of the database when it is assigned to them. i have a table that contains their names and email addresses listed. I am connected to email in Exchange and we use the GAL.

  4. #4
    Join Date
    May 2005
    Posts
    119
    Try this: but note it will only work if SMTP is enabled on your exchange server.

    Function sendemal()
    Dim objEmail As Object
    Set objEmail = CreateObject("CDO.Message")
    objEmail.From = "[EnterReplyToAddress]"
    objEmail.To = "[EnterToAddress]"
    objEmail.CC = "[EnterCCAddress]"
    objEmail.bCC = "[EnterBCCAddress]"
    objEmail.Subject = "[Subject line details]"
    objEmail.textbody = "[message]"
    objEmail.Configuration.Fields.Item("Error") = 2
    objEmail.Configuration.Fields.Item("Error") = "[Enter your exchange server name or IP address]"
    objEmail.Configuration.Fields.Item("Error") = [Your server port, try 25]
    objEmail.Configuration.Fields.Update
    objEmail.Send
    End Function

  5. #5
    Join Date
    May 2005
    Posts
    119
    crap.. the links changed.
    let me work on that... the "error" is actually a code that converted to a link when I posted. I'll try to post it as plain text, but give me a minute.

  6. #6
    Join Date
    May 2005
    Posts
    119
    (you'll need to put the http:// in front of these and replace the "error" messages)
    schemas.microsoft.com/cdo/configuration/sendusing")=2
    schemas.microsoft.com/cdo/configuration/smtpserver") = "[Enter your exchange server name or IP address]"
    schemas.microsoft.com/cdo/configuration/smtpserverport") = [Your server port, try 25]

Posting Permissions

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