Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Error 2295:  Unknown message recipients

Posted on 2006-11-30
9
Medium Priority
?
821 Views
Last Modified: 2011-09-20
Hi All :)

I have a module that sends email to all users in a database for administrative purposes.  It uses network ID's and the exchange server resolves the addresses.  However, suddenly I'm getting the subject error, and it will not produce the email.  Is there a way to force this without having to use addresses?

Thanks!
~Jillyn
0
Comment
Question by:Jillyn_D
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18049666
Hey Jill,
you can actually link to your exchange server address list and do an Access internal lookup to the linked table to do your own name resolution. You could also query the names and e-mail addresses and create an Access table that you can modify to suit your needs. Can you paste in the code you're using now to send these mails?
0
 
LVL 8

Author Comment

by:Jillyn_D
ID: 18078831
Hi Jeff :)

Sorry about the delay on this!  I completely forgot about it over the weekend.

Linking to the address book doesn't work very well because we have about 200,000 people in our GAL...Makes things very slow!  I can't use my personal address book because most of my users are not in it, and my user group is far from static.

The object here is to send out notifications to my test group for an application when a new test version is available.  However, I user similar procedures for notification in a lot of applications.


This is the generic version:

Public Sub eMailUsers()
Dim rs As Recordset
Dim lngLim As Long, lngCnt As Long
Dim strCC As String, strTo As String, strSub As String, strMsg As String
    Set rs = CurrentDb.OpenRecordset("tblUsers")
    rs.MoveLast
    lngLim = rs.RecordCount
    For lngCnt = 1 To lngLim
        If lngCnt <> 1 Then
            rs.MoveNext
        Else
            rs.MoveFirst
        End If
        If rs!Group = "Admin" Then
            strCC = strCC & rs!UserID & "; "
        Else
            strTo = strTo & rs!UserID & "; "
        End If
    Next
   
    strSub = InputBox("Please enter subject")
    strMsg = InputBox("Please enter message")
   
    DoCmd.SendObject , , , strTo, strCC, , strSub, strMsg, True
   
End Sub
0
 
LVL 8

Author Comment

by:Jillyn_D
ID: 18078864
BTW, thanks for responding to my ?

:)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Expert Comment

by:jefftwilley
ID: 18079079
Hey Jilly,
Exchange resolves this ok...with network ids..given that there is an alias defined in the address table. Has there been some kind of recent change to your e-mail system? Is it your intention to go ahead and let it choke on one or two but continue to send the rest?
0
 
LVL 8

Author Comment

by:Jillyn_D
ID: 18079390
jefftwilley,

Honestly, I wouldn't care if it choked on all of them in this instance.  However, the network IDs are the GAL alias and uniquely identify the users, so there should be no hiccups there.  The problem is that Access won't even generate the email.  It gives me the unknown recipients message and stops.

As for the email system...IT is always making changes, but I am not aware of anything specific with exchange recently.

~Jillyn
0
 
LVL 34

Accepted Solution

by:
jefftwilley earned 2000 total points
ID: 18079508
Your code works elsewhere...right? The only thing I see that may be an issue is you probably need to trim the ; at the end of the strTo and strCC .

Try a quick swap and see if it makes a diff

Public Sub eMailUsers()
Dim rs As DAO.Recordset
Dim strCC As String, strTo As String, strSub As String, strMsg As String
    Set rs = CurrentDb.OpenRecordset("tblUsers")
    If rs.EOF Then
        MsgBox " No Records Pulled"
        Exit Sub
    End If
    rs.MoveFirst
    Do Until rs.EOF
        If Nz(rs!Group) = "Admin" Then
            strCC = strCC & Nz(rs!UserID) & "; "
        Else
            strTo = strTo & Nz(rs!UserID) & "; "
        End If
    rs.MoveNext
    Loop
    rs.Close
    Set rs = Nothing
    'deal with nulls and ending odd characters here
    strTo = Left(strTo, Len(strTo) - 1) & ""
    strCC = Left(strCC, Len(strCC) - 1) & ""
    strSub = InputBox("Please enter subject") & ""
    strMsg = InputBox("Please enter message") & ""
   
    DoCmd.SendObject , , , strTo, strCC, , strSub, strMsg, True
End Sub
0
 
LVL 8

Author Comment

by:Jillyn_D
ID: 18079549
*laughs* AMAZING!

As always, your brilliance is blinding :)  Thanks, Jeff!
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18079568
Most welcome. Have a great day!
J
0
 
LVL 8

Author Comment

by:Jillyn_D
ID: 18079583
Thanks!  You too!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question