Re: Mail to a group
- From: "Danny J. Lesandrini" <dlesandrini@xxxxxxxxxxx>
- Date: Sun, 1 Mar 2009 16:03:01 -0700
The exact process will depend on how you're getting the 190 addresses now.
I don't have the code here, but one app I have will parse a list of semicolon delimited
list of email addresses and process them one at a time.
Alternatively, and probably more likely, you have a table from which they reside. Then
it's a simple matter of looping through a recordset.
Dim db As Dao.Database, rs As Dao.Recordset
Dim sSQL As String, sEmail As String, sRecip As String
Dim sBody As String, sSubject As String
sSQL = "SELECT FName & ' ' & LName As Recip, Email FROM tblPersons"
Set db = CurrentDb
Set rs = db.OpenRecordset(sSQL, dbOpenSnapshot)
If Not rs.BOF and Not rs.EOF Then
Do Until rs.EOF
sEmail = Nz(rs!Email, "")
sRecip = Nz(rs!Recip, "")
sBody = "Hi " & sRecip & vbCrLf & vbCrLf & "Here's your email."
sSubject = "Email from The Database System"
' Send email here. You've got the email, a recipient name, body text and subject.
docmd.SendObject , , , to,cc,bcc,subject,messagetext, false
rs.MoveNext
Loop
End If
Set rs = Nothing
Set db = Nothing
The DoCmd.SendObject is something you can read more about in Help files.
--
Danny J. Lesandrini
dlesandrini@xxxxxxxxxxx
www.amazecreations.com
"Leif Thorsen" <LeifThorsen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote ...
Thank You for Your answer but I don´t think the problem is a mistyped address
because the error message comes long before Outlook has started to send the
e-mails. But - I think Your idea of looping the e-mails as You say but the
problemis that I am not familiar how to do. Can You give me a new hint ?? I
hope You can and therefore THANK YOU IN ADVANCE
Best regards
Leif
"Danny J. Lesandrini" wrote:
Leif:
sometimes error messages are correct and on point. could it be that the
190th email address was mistyped? That would produce the error "unknown
recipients".
I've never heard of a limit on email addresses and if there was, it would
probably be a binary number, like 256 or 128. Maybe it's a question of the
length of the total character string exceeding 8000 characters or something,
but more likely, the error message is correct and you have a bad address.
For that matter, it's probably not a good idea to send out a single email with
190 addresses. Why not loop through and send 1 email 190 times, once to
each recipient? That will make it more likely that the email won't be bounced
by anti-spam software and it will alert you to incorrect email addresses.
--
Danny J. Lesandrini
dlesandrini@xxxxxxxxxxx
www.amazecreations.com
"Leif Thorsen" <LeifThorsen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote ...
I have in this disscussion forum got a tip of a method to make a group-mail
to a lot of mail-addresses taken from a question. When using this metod it
seems that there is a limitation of how many e-mailaddresses You can use at
the same time. When I have a question with 190 items I will have error number
2295 "Unknown recipients. The letter was´nt sent." When I reduce my items in
the question to below 100 there is no problems. Is there some sort of
limitation for how many e-mailaddresses I can use at the same time ????
Than You in advance for an answer
Leif Thorsen
.
- Follow-Ups:
- Re: Mail to a group
- From: Leif Thorsen
- Re: Mail to a group
- References:
- Re: Mail to a group
- From: Danny J. Lesandrini
- Re: Mail to a group
- From: Leif Thorsen
- Re: Mail to a group
- Prev by Date: Re: Access 2007
- Next by Date: create pdf programatically
- Previous by thread: Re: Mail to a group
- Next by thread: Re: Mail to a group
- Index(es):
Relevant Pages
|