Emailing via access

bob81

New member
Local time
Tomorrow, 06:01
Joined
Apr 1, 2005
Messages
5
hi
I was wondering if anyone could tell me how I can automatically generate an email through access. I've done a query that results in a whole lot of email addresses, I would like to put those email addresses in the 'To:' part of the email. Is this possible? Can anyone please help?

Thanx Bob
 
As one bulk email to all recipients or as an individual email to each recipient?
 
One bulk email

Thanks for responding to my request. I'd like to know how to send out one bulk email based on aquery I have created. Any help you could give me would be great. Thanks again.
 
I would be fairly easy to open a recordset based on your query, then loop through it and build a string variable with a semi-colon between each address, so that the result looked like:

paul@abc.com; bill@xyz.com

That string could then be used as the "To" by whatever method you're using to send the email.
 
Please Help

Thanks heaps for your response

I'm not very good at programming. So I'm not really sure what I'm doing
Here's what I've done:

I call the function 'fHandleFile' and do the following but I only get one address to appear. How do I loop through an entire field?

x = fHandleFile("mailto:" & Me!EmailAddress, WIN_NORMAL)
 
How to Send Email on Mass

I'm trying to send out an email to many people at once based on a particular query.

I'm not very good at programming. So I'm not really sure what I'm doing
Here's what I've done:

I call the function 'fHandleFile' and do the following but I only get one address to appear. How do I loop through an entire field?

x = fHandleFile("mailto:" & Me!EmailAddress, WIN_NORMAL)
 
Try something like this before calling that (you'll need the DAO reference added if it isn't already):

Code:
  Dim db                 As DAO.Database
  Dim rs                 As DAO.Recordset

  Set db = CurrentDb()

  Set rs = db.OpenRecordset("YourQueryName", dbOpenDynaset)
  Me.EmailAddress = ""
  Do While Not rs.EOF
    Me.EmailAddress = Me.EmailAddress & rs!EmailFieldName & ";"
    rs.MoveNext
  Loop
  Me.EmailAddress = Left(Me.EmailAddress, Len(Me.EmailAddress) - 1)
  Set rs = Nothing
  Set db = Nothing
 
Bob

There are lots of threads here on this subject if you search for them. Most common way is to use the "sendobject" method, check this out in the acces help files
 
A couple of things to take not of:

  • Please stick to the same thread rather than opening up multiple threads on the same subject. The two threads have now been merged.
  • Don't post the same question to multiple forums. This is just a waste of others' time.
  • Don't contact someone to answer your question if not solicited to do so. Keep questions to the forum unless you want to engage in costly consultancy.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom