If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Sending Automated Emails from my database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-12, 18:43
lcking0623 lcking0623 is offline
Registered User
 
Join Date: Aug 2012
Posts: 5
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!!!
Reply With Quote
  #2 (permalink)  
Old 08-10-12, 10:13
Krista327 Krista327 is offline
Registered User
 
Join Date: May 2005
Posts: 114
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?
Reply With Quote
  #3 (permalink)  
Old 08-10-12, 10:15
lcking0623 lcking0623 is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 08-10-12, 10:37
Krista327 Krista327 is offline
Registered User
 
Join Date: May 2005
Posts: 114
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
Reply With Quote
  #5 (permalink)  
Old 08-10-12, 10:39
Krista327 Krista327 is offline
Registered User
 
Join Date: May 2005
Posts: 114
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.
Reply With Quote
  #6 (permalink)  
Old 08-10-12, 10:42
Krista327 Krista327 is offline
Registered User
 
Join Date: May 2005
Posts: 114
(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]
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On