473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 4170
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.RegularExpressions.Regex(strRegex)

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

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

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

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

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

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

Catch ex As Exception
MessageBox.Show(ex.ToString, "Problem with Email",
MessageBoxButtons.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...@example.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.com/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.comwrote:
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 "OutlookEMail". 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.gov. 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.gov>
You will then have a column in your output consisting of the first
line being "OutlookEmail", and then underneath it,
"Benedict"*<po**@vatican.gov>, "dubya"*pr*******@whitehouse.gov, 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 "OutlookEmail" (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
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...
2
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....
5
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...
1
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...
3
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...
2
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...
4
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(),...
2
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...
5
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.