Click here to Skip to main content
15,895,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I develop Add-ins for my outlook that archive emails.
and I want to ask the sender when he send email with attachments if he want to send the attachments to the CC's Or not.
how to proceed this action?
Please Help.

Here is the code that proceed the outlook item:
VB
Private Sub Application_ItemSend(ByVal Item As Outlook.MailItem, ByRef Cancel As Boolean) Handles Application.ItemSend
    GetMessageID_NEW(Nothing, Item, Item, "OUTGOING")
    If Item.Attachments.Count > 0 Then
        If Not Item.CC Is Nothing Then
            If MessageBox.Show("Do you want to send the attachments to CC(s)?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
                ' What should I write here?
             End If
        End If
     End If
End Sub
Posted
Updated 27-Jan-13 2:35am
v2

There is nothing is mail standards about it. If you want to ask anyone about anything, just do it. But CC is a separate header with just address(es). If your mail message has "attachments", it will be sent to CC addresses as well. Note, that nothing is actually "attached". "Attachment" is nothing but a "part" in a multi-part message. As the whole message is sent somewhere, it is sent as a whole.

Please see: http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html[^].

—SA
 
Share this answer
 
v3
Comments
maleksafadi 27-Jan-13 3:08am    
How do I proceed this action?
How to send the attachment to all Recipients in TO(s) without sending it to CC(s)?
Sergey Alexandrovich Kryukov 27-Jan-13 3:09am    
I just answered. You cannot.
—SA
You cannot send attachments to selective recipients. The only way to accomplish that is to send the original attachment email to the people who need the attachment, then create a second email that doesn't have the attachment and send that to the people that don't get the attachment. The problem with this is that the two groups of people are now no longer part of the same email chain and replies to those emails will not go to everyone.
 
Share this answer
 
After deep search there is no solution only to send two emails.

Thanks all.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900