georgemason
asked on
Limit maximum number of CC: recipients
Hi Experts,
I'm pretty sure this can't be done without coding (not sure if it can even be done WITH coding!) but I'll ask anyway....
All I need to do is restrict the number of Internet email addresses that certain Exchange 2003 users can send or CC to. I know it's simple to limit the max number of recipients for messages within Exchange, but I need to be more specific; they need to be emails to Internet addresses (i.e. not to limit internal emails) and they have to be in either the TO or CC lines - BCC is ok.
I'm not holding my breath on this one!
TIA.
George
I'm pretty sure this can't be done without coding (not sure if it can even be done WITH coding!) but I'll ask anyway....
All I need to do is restrict the number of Internet email addresses that certain Exchange 2003 users can send or CC to. I know it's simple to limit the max number of recipients for messages within Exchange, but I need to be more specific; they need to be emails to Internet addresses (i.e. not to limit internal emails) and they have to be in either the TO or CC lines - BCC is ok.
I'm not holding my breath on this one!
TIA.
George
Locate the following key in the registry:
HKEY_LOCAL_MACHINE\System\ CurrentCon trolSet\Se rvices\MSE xchangeIS\
ParametersSystem
On the Edit menu, click Add Value, and then add the following
registry value:
Value Name: Max Recipients on Submit
Data Type: REG_DWORD
String: A value equal to the max. recipients you
wish to allow
Quit Registry Editor.
This limit also applies to messages transferred into the store by the
Internet Mail Service. An event 4117 is logged and the message is moved to the Archive folder. The message is not delivered and it does not send a non-delivery report.
If a user attempts to send a message to more recipients than is designated by the Max Recipients on Submit parameter and the user has the new Emsmdb(32).dll, the following error message may be displayed when the user attempts to send the message:
The item could not be sent. The number of recipients on this message
exceeds the upper limit configured by the administrator.
If a user attempts to send a message to more recipients than is designated by the Max Recipients on Submit parameter and the user DOES NOT have the new Emsmdb(32).dll, the following error message may be displayed when the user attempts to send the message:
The item could not be sent. The client operation failed.
HKEY_LOCAL_MACHINE\System\
ParametersSystem
On the Edit menu, click Add Value, and then add the following
registry value:
Value Name: Max Recipients on Submit
Data Type: REG_DWORD
String: A value equal to the max. recipients you
wish to allow
Quit Registry Editor.
This limit also applies to messages transferred into the store by the
Internet Mail Service. An event 4117 is logged and the message is moved to the Archive folder. The message is not delivered and it does not send a non-delivery report.
If a user attempts to send a message to more recipients than is designated by the Max Recipients on Submit parameter and the user has the new Emsmdb(32).dll, the following error message may be displayed when the user attempts to send the message:
The item could not be sent. The number of recipients on this message
exceeds the upper limit configured by the administrator.
If a user attempts to send a message to more recipients than is designated by the Max Recipients on Submit parameter and the user DOES NOT have the new Emsmdb(32).dll, the following error message may be displayed when the user attempts to send the message:
The item could not be sent. The client operation failed.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So ... it looks like if you want to set it per user, you may have to do the registry key. You can edit another persons registry hive as long as they are logged out.
http://support.microsoft.com/kb/q126497/
Or you can set it in exchange, which is always a good idea to prevent people from sending to everybody when they aren;'t allowed to use specific distro lists.
regards
http://support.microsoft.com/kb/q126497/
Or you can set it in exchange, which is always a good idea to prevent people from sending to everybody when they aren;'t allowed to use specific distro lists.
regards
ASKER
Sorry I don't think you've understood what I need to do - I need to limit the number of TO and CC recipients, but not BCC. I know how to restrict the total number of recipients but this is too restrictive for what I need.
You're right. You would probably have to code it. You can't limit the number of "to" or "cc" but not limit the numebr of "bcc". It's kind of all or nothing.
Post a question or pointer in the outlook section. There's a couple of guys there that do some awesome outlook coding. BlueDevilFan is one of my heros.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SB and I are doing essentially hte same thing, just in slightly different ways. I opted not to split the To and CC lines because a user can opt to use commas as delimiters in addition to semicolons.
I started out that way...(you've taught me well ;^)
I wouldn't think you'd need the case for BCC there?
I wouldn't think you'd need the case for BCC there?
ASKER
Sounds good to me, thanks very much.
I think the way I'll do it is via an Outlook add-in, as it's a good compromise between being somewhat covert (if only a bit) and doesn't require such a steep learning curve as Exchange event sinks. Just done a bit of reading on those and they sound quite daunting!
I'll split the points to reflect your contributions. Thanks again.
I think the way I'll do it is via an Outlook add-in, as it's a good compromise between being somewhat covert (if only a bit) and doesn't require such a steep learning curve as Exchange event sinks. Just done a bit of reading on those and they sound quite daunting!
I'll split the points to reflect your contributions. Thanks again.
ASKER
.... but before I do, sirbounty has a point there!
Why the extra case for BCC? We're not interested in how many BCC recipients there are in this case?
Why the extra case for BCC? We're not interested in how many BCC recipients there are in this case?
I think it was inadvertently placed...and easily removed - though it wouldn't cause any harm...just a miniscule bit of counter processing...
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim olkRecipient As Outlook.Recipient, _
intTo As Integer, _
intCC As Integer, _
intBCC As Integer
If Item.Class = olMail Then
For Each olkRecipient In Item.Recipients
Select Case olkRecipient.Type
Case olTo
intTo = intTo + 1
Case olCC
intCC = intCC + 1
' Case olBCC
' intBCC = intBCC + 1
End Select
Next
If (intTo > 10) Or (intCC > 10) Or ((intTo + intCC) >= 15) Then
MsgBox "You are only allowed 10 address on the To and CC lines, or 15 between the two.", vbCritical + vbOKOnly, "Message Not Sent"
Cancel = True
End If
End If
Set olkRecipients = Nothing
End Sub
Private Sub Application_ItemSend(ByVal
Dim olkRecipient As Outlook.Recipient, _
intTo As Integer, _
intCC As Integer, _
intBCC As Integer
If Item.Class = olMail Then
For Each olkRecipient In Item.Recipients
Select Case olkRecipient.Type
Case olTo
intTo = intTo + 1
Case olCC
intCC = intCC + 1
' Case olBCC
' intBCC = intBCC + 1
End Select
Next
If (intTo > 10) Or (intCC > 10) Or ((intTo + intCC) >= 15) Then
MsgBox "You are only allowed 10 address on the To and CC lines, or 15 between the two.", vbCritical + vbOKOnly, "Message Not Sent"
Cancel = True
End If
End If
Set olkRecipients = Nothing
End Sub
ASKER
Thought so. Good work. Thanks.
My heroes!!!
Yeah, there's no need for the BCC counter. I put it there both to illustate that it's available and in case you wanted to use the count for some purpose. It also makes for nice symmetry.
ASKER
Yeah, that's true, can't argue with the symetry. Perfect feng-shui!
How do we get this code working in Outlook? Could you provide specific procedure, thanks!!!
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim olkRecipient As Outlook.Recipient, _
intTo As Integer, _
intCC As Integer, _
intBCC As Integer
If Item.Class = olMail Then
For Each olkRecipient In Item.Recipients
Select Case olkRecipient.Type
Case olTo
intTo = intTo + 1
Case olCC
intCC = intCC + 1
' Case olBCC
' intBCC = intBCC + 1
End Select
Next
If (intTo > 10) Or (intCC > 10) Or ((intTo + intCC) >= 15) Then
MsgBox "You are only allowed 10 address on the To and CC lines, or 15 between the two.", vbCritical + vbOKOnly, "Message Not Sent"
Cancel = True
End If
End If
Set olkRecipients = Nothing
End Sub
Private Sub Application_ItemSend(ByVal
Dim olkRecipient As Outlook.Recipient, _
intTo As Integer, _
intCC As Integer, _
intBCC As Integer
If Item.Class = olMail Then
For Each olkRecipient In Item.Recipients
Select Case olkRecipient.Type
Case olTo
intTo = intTo + 1
Case olCC
intCC = intCC + 1
' Case olBCC
' intBCC = intBCC + 1
End Select
Next
If (intTo > 10) Or (intCC > 10) Or ((intTo + intCC) >= 15) Then
MsgBox "You are only allowed 10 address on the To and CC lines, or 15 between the two.", vbCritical + vbOKOnly, "Message Not Sent"
Cancel = True
End If
End If
Set olkRecipients = Nothing
End Sub
ASKER