Click here to Skip to main content
Sign Up to vote bad
good
See more: C#VB.NET
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:
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 26-Jan-13 20:40pm
Edited 27-Jan-13 2:35am


3 solutions

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.
  Permalink  
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
  Permalink  
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
After deep search there is no solution only to send two emails.
 
Thanks all.
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Christian Graus 538
1 Ron Beyer 286
2 samadhan_kshirsagar 229
3 Tadit Dash 213
4 OriginalGriff 198
0 Sergey Alexandrovich Kryukov 7,017
1 Prasad_Kulkarni 3,815
2 OriginalGriff 3,557
3 _Amy 3,372
4 CPallini 3,010


Advertise | Privacy | Mobile
Web01 | 2.6.130619.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid