Solved

Error 2295:  Unknown message recipients

Posted on 2006-11-30
9
765 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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 500 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

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!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

738 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