MS Access - Email Mass Mailing?

I use MS Access to create a database with more than 5000 contacts. These contacts are divided into who owns the contact, and then again in the category for easy search. I want to create a button that will open a query in the form of a table (simple), and then check the boxes so that the employee can select, for example, 100 contacts to send email from 110 to the table, and then send a bulk email, such as a newsletter ( not so easy!). I went crazy trying to figure out how to do this, because I do not really understand programming (I’m a pace thrown into this work, and I try my best), and all I can find on this issue is that- it’s about cycles (I don’t know!) and that for this I need software.

Any solutions for me please? I would like to avoid buying / installing software if possible, and if you have an answer, please make it as simple as possible ...

Thanks in advance!

Kate

+3
source share
8 answers

I just created the following working example in MS Access 97.

Example table (I checked the code with valid email addresses):

Identifier Name Email

1 Rics rics@stack.com

2 Kate kate@stack.com

3 X x@stack.com

One-button form. When the button is pressed, the following code is executed:

Private Sub Mail_Click() Dim r As Recordset Dim email As String Set r = CurrentDb.OpenRecordset("select * from Addresses") Do While Not r.EOF email = r(2) DoCmd.SendObject acSendNoObject, Null, Null, email, Null, Null, "Test subject", "Message body of the test letter", False, Null r.MoveNext Loop r.Close End Sub 

Hope you can paste it into your application.

+1
source

Got a job :)

The code was great, but it needed some configuration to work. After a lot of errors came up, I finally came up with:

  Dim r As Recordset Dim Email As String Set r = CurrentDb.OpenRecordset("select Email from FranksFinanceBrokers") Do While Not r.EOF Email = Email & r(0) & ";" r.MoveNext Loop r.Close DoCmd.SendObject acSendNoObject, Null, Null, "", "", Email, "", "", True, Null End Sub 

Thanks ur help guys!

+1
source

I think you need to learn VBA coding to do this. This tutorial may be helpful.

Here is the way to send email with access .

0
source

Here is another resource for sending email through MS Access

0
source

The answer rics provided will send an email to everyone in the recordset, but it looks like what you want to do is send one email to your own mailing list. To do this, configure the rics code to create an address bar something like this:

Private recharge Mail_Click ()

 Dim r As Recordset Dim email As String Set r = CurrentDb.OpenRecordset("select * from Addresses") Do While Not r.EOF email = email & r(2) & ";" r.MoveNext Loop r.Close DoCmd.SendObject acSendNoObject, Null, Null, email, Null, Null, "Test subject", "Message body of the test letter", False, Null 

End Sub

0
source

Kate

Sorry that there is no specific “magic” code for what you plan to do. You need to write something. My solution would be:

  • Create a form with three controls: 1 text control, 1 list control., 1 submit button
  • The text control contains the text to send
  • The list control displays all my available emails (filled with a set of records)
  • Multiselect will be enabled, so I can select multiple items in the list
  • By clicking the button, I will

    Combine all the selected letters to get the string "sendTo", such as sendTo = " bla@bla.com ; blo@blo.com ". Call doCmd.sendObject method using sendTo + text string as argument

Parameters may be

  • You have additional control over the email object.
  • Save traces of sent letters in a table (subject, text, date, people). It can be as simple as a “one email entry” with a notes field for writing a sendTo text string (of course, you could build something smarter with multiple tables to adhere to the many-to-many relationship that can be established between your people a table and a mail table, but you may not need this)
0
source

Sending emails from Access has a number of errors, not least because it can make you look like a spammer and cause problems with your mail node. In addition, there are many security concerns. The best source of information about this is the Tony Toews Email FAQ .

0
source

There are several ways to get around missing email addresses. The easiest way is to edit your SQL to exclude them:

Choose an email address from FranksFinanceBrokers. WHERE (STAGE NOT NULL) AND (Email <> "")

Another approach would be to add an IF statement to the string building code:

IF Not IsNull (r (0)) AND r (0) <> "THEN Email = Email and r (0) and"; "

I would just filter it at the SQL level - more efficiently and simply.

Would it be easier to buy software for this? Yes, but where is the challenge in this? :-) You are already there most of all, so I will stick to this.

0
source

All Articles