473,738 Members | 2,645 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Emailing with Access

I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.
Jun 27 '08 #1
8 4193
On Apr 29, 1:30*pm, marjb...@gmail. com wrote:
I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.
You may want to consider using MS Word. Create the document as you
would any mail merge using a query of your Access data as the data
source. Select "Merge to Email" as your output option.

I like this approach because it allows personalization of the outgoing
message ("Dear Tim, you've been a member of XYZ for 12 years") and
it's easy to assign the task to any staff person (all they really need
to know if Word).

Note that your ISP may not like the volume of messages going out
through Outlook/Exchange and it can take a while to cycle through
several thousand records. Then you'll have to sort through the
undeliverable/returned mail, but that can be quite an education about
your customers.

For a large volume solution you may want to look at a commercial email
service such as Constant Contact or similar.

Good luck,

Tim Mills-Groninger
Jun 27 '08 #2
On Tue, 29 Apr 2008 11:30:04 -0700 (PDT), ma******@gmail. com wrote:
I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.
Download
EmailSenate or EmailSenate2K
from
http://www.datastrat.com/DataStrat2.html
for a working sample database.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 27 '08 #3
ma******@gmail. com wrote:
>I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.
Poke about at the Microsoft Access Email FAQ
http://www.granite.ab.ca/access/email.htm

You will need to use VBA code to run through a recordset to individually send the
emails. For sample recordset logic see
http://www.granite.ab.ca/access/email/recordsetloop.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jun 27 '08 #4
It used to be you could send out emails through outlook from Access, but
now Outlook has all these security prompts each time you interface with
Outlook - which makes it pretty much unsuable from/through automation.

The easiest solution I came up with was to write my own Emailer program
in VB.Net which contains all the classes required for emailing using
whatever mail server Outlook would use. I can read the email addresses
from an Access mdb and then send them out through my emailer program --
adding a generic subject line/body.

I realize this is not a .Net forum, but incase anyone cares, here is the
part of the .Net code which would send out the emails:

-------------------------------------------
Imports System
Imports System.Data
Imports System.Net.Mail
Imports System.IO

Private Sub SendTheEmail()
Try
Dim Client As SmtpClient
Dim Message As MailMessage
Dim strRegex As String
strRegex =
"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-
Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"
Dim Expression As New System.Text.Reg ularExpressions .Regex(strRegex )

Message = New MailMessage
Message.From = New MailAddress(txt From.Text)

For Each dr As DataRow In tblEmail.Rows
'--validate email before adding to Send Email list
If Not Expression.IsMa tch(dr("Email") .ToString) Then
Throw New System.Exceptio n("Invalid Email Address Exception has
occured for " & dr("ID_Main").T oString & " " & dr("Email").ToS tring)
Else
Message.To.Add( New MailAddress(dr( "Email").ToStri ng))
End If
Next

Message.Subject = txtSubject.Text
Message.Body = rtbBody.Text

Message.IsBodyH tml = True '-- use this if formatting with
'--html tags else exclude this line

'--my Outlook was using the comcast email server
Client = New SmtpClient("mai l.comcast.com")

Client.Send(Mes sage)
MessageBox.Show ("done sending mail!")

Catch ex As Exception
MessageBox.Show (ex.ToString, "Problem with Email",
MessageBoxButto ns.OK)
End Try
End Sub
----------------------------------------------

tblEmail is a .Net dataTable contained in the Emailer program which
contains the email addresses to mail to imported from an Access mdb.

This .Net program could also be created as a DLL which could be
referenced from an Access mdb, and actually, I could have eliminated the
.Net loop and just looped in Access -- calling the .Net dll for each
iteration of the loop. But instead I just read the whole table into the
.Net program and just emailed everything in one shot. The .Net program
also performs email validation using a Regular Expression - which this
could also be done directly in Access by Referencing RegEx in
Tools/References.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #5
On Apr 29, 11:46*am, fredg <fgutk...@examp le.invalidwrote :
On Tue, 29 Apr 2008 11:30:04 -0700 (PDT), marjb...@gmail. com wrote:
I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.

Download
EmailSenate or EmailSenate2K
fromhttp://www.datastrat.c om/DataStrat2.html
for a working sample database.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
That is very cool! Unfortunately, I don't know VBA well enough to
change it to suit it to an individual database. Thank you for your
help. I checked out the click event, and saw what I think might have
to be changed. But I am not sure how to do it. For all I know there
might be more to change than what I think too. Any suggestions?
Jun 27 '08 #6
On Apr 29, 11:42*am, timmg <tmillsgronin.. .@gmail.comwrot e:
On Apr 29, 1:30*pm, marjb...@gmail. com wrote:
I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.

You may want to consider using MS Word. *Create the document as you
would any mail merge using a query of your Access data as the data
source. *Select "Merge to Email" as your output option.

I like this approach because it allows personalization of the outgoing
message ("Dear Tim, you've been a member of XYZ for 12 years") and
it's easy to assign the task to any staff person (all they really need
to know if Word).

Note that your ISP may not like the volume of messages going out
through Outlook/Exchange and it can take a while to cycle through
several thousand records. *Then you'll have to sort through the
undeliverable/returned mail, but that can be quite an education about
your customers.

For a large volume solution you may want to look at a commercial email
service such as Constant Contact or similar.

Good luck,

Tim Mills-Groninger
Thank you for your suggestion. Yes, I believe that would work whether
it was in Word or Excel. But as you say it would be a lot of training
for my customer.
Jun 27 '08 #7
On Tue, 29 Apr 2008 11:30:04 -0700 (PDT), ma******@gmail. com wrote:
>I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.
Create a query that has, as one of its fields, a variable which I will
call "OutlookEMa il". The source of this query is a list of names,
from either a table or another query, that includes a field that has
the regular email address, such as po**@vatican.go v. The new field you
will create has, as its header in your query setup, looking like this:

OutlookEmail: '"' & [FirstLine] & '" <' & [EmailAddress] & ">"
The thing that looks like three apostrophes is:
single quote, double quote, single quote. (the single quotes are used
to bracket the double quote so that the double quote will not be
interpreted as a special character.) FirstLine is the name of the
person, such as "Benedict". The expression following the second
ampersand is single quote, double quote, space, <, single quote. This
will produce a line looking like:
"Bendict" <po**@vatican.g ov>
You will then have a column in your output consisting of the first
line being "OutlookEma il", and then underneath it,
"Benedict"*<po* *@vatican.gov>, "dubya"*pr***** **@whitehouse.g ov, and
so on. Select this column and put the column on your clipboard.
THEN: Get into Outlook and paste the clipboard into either the "To"
field or the BCC (blind carbon copy) field. Manually remove the top
entry, ie, delete "OutlookEma il" (this isn't a legitimate email
address).
You can simplify this if you don't want the aliases in your
Outlook list. If the query simply has the email addresses, you could
have the query simply list the email addresses (without the "pope"
etc). Again, copy the column onto the clipboard and paste it into
Outlook.
The main point here is that the clipboard is your useful tool
for doing this. You don't need to delve into the bowers of Access and
Outlook to link your two programs.
Pete Brady
Jun 27 '08 #8
ma******@gmail. com wrote:
I have a Access database of email addresses that I would like to mass
email to customers. Can Access be used through Outlook? or can it just
be done with Access? I know it is possible to use MailMerge for
snailMail.
I had a problem running VB and creating reports, so what I did was to
create a form with the information I wanted on it. I would display all
but the e-mail address. I would have one button that would allow me to
fire off the e-mails. The code would do:

- set the button to invisible.
- go to the first record in the set (use a DoCmd for this)
- use another DoCmd to send the e-mail to the person in the email
address. Send as a Snapshot.
- Use another docmd to go to the next record
- check to see if the e-mail adress is NULL (if so, stop the program)
then go to the first line again.

That would limit your coding.

The other option is to make a report that selects only one record from
the query. You could have a form that fires the code

' get the current record
' run a docmd to run the report,with the option to SendTo and where clause
' move to the next record (again with a do cmd)
' wash, rinse, repeat...

If you don't want to dirty your hands with code, then I think you are
out of luck. You could drop down a level and use macros, but code is
cleaner, and you can debug it while running.

Be sure to be liberal with the DoEvents otherwise you will hang your
system and flood some unsuspecting schmuck with a bunch of e-mail.
Open a few accounts on mail.google.com and mail to them to see how it
comes out.
Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2249
by: Brendan MAther | last post by:
I have a table called Contact_Info. I have a form that allows me to show all the contacts from a specified city and sector. Once these contacts appear on my new form I would like to be able to press a button and it would take their email addresses, from the 'email' field, and enter them into Outlook in the "TO:" box so that they can all be emailed the same document. Any help would be much appreciated, thank you, Brendan
2
1964
by: Chuck | last post by:
I have a database that has a table in it with employee information (name, dob, email, etc). This is joined to a table that has tasks that are assigned to each individual that has a recurring date. For example, Joe must take an annual CPR class, Bob needs to take his Hearing Test, Ann must take her Eye Exam. The task table keeps the completed date in it, while the form that displays it calculates the next due date (using dateadd). So, as...
5
7386
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a Run-time error. When I run it on an XP machine it crashes, but on an NT box it just generates an unknown error, handled by the error handler. I have debugged and stepped through the code and have narrowed the issue to the point at which the...
1
2429
by: Andrew Wrigley | last post by:
Hi I am setting up emailing for an all Access contact management app and DO NOT want to use Outlook. Aspemail.dll (aspemail.com) works fine, but... Unless you pay the licence fee for the premium features, you cannot access a smtp host that requires authentication with username and password.
3
2366
by: Strasser | last post by:
In Access2000 mass emailing worked perfectly (very powerful tool!). Doesn't work when using XP version of both Access and Outlook, even though I checked the box to ensure that I was sending the email. Any ideas? Thanks in advance.
2
1506
by: Wayne | last post by:
I am experiencing an intermittent problem when emailing snapshot reports using Sendobject. Outlook opens with the snapshot of the report attached but when I click the "Send" button on the Outlook toolbar it only works intermittently ie. sometimes the email is sent and others nothing happens. Using File/Send on the Outlook menu bar also works intermittently. However if I use the keyboard shortcut: Ctrl + Enter it works every time and the...
4
1446
by: Farooq Khan | last post by:
hi, i'm using CDONTS component for emailing through one of my web service like this // Start of code // 'email' is the CDONTS object name email.send(EmailFrom.ToString(), EmailTo.ToString(), Subject.ToString(), Body.ToString(), 1)
2
2239
by: Tim Hunter | last post by:
I have two questions regarding emailing from Access. My first question relates to how many email addresses is too much. I have a client who wants to email 1500 people at once. Is this possible or smart? what would be a reasonable number? My second question is related to emailing customers who have an anniversary or a Birthday. Is it possible to personalize each email with a name? TIA Tim
5
2030
by: szag via AccessMonster.com | last post by:
First - I don't know VBA very well at all. I have report that I want to email to multiple users that give them the quantities of their Inventory parts only. So I need something that will loop through each user and send them a report (as an attachment) with only their information in it. There are about 60 people to email to. I have used the macro send command but that allows for only static name at a time...so it won't work for these...
0
8968
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9334
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.