Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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  
v3
Comments
maleksafadi at 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 at 27-Jan-13 3:09am
   
I just answered. You cannot.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

After deep search there is no solution only to send two emails.
 
Thanks all.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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  

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

  Print Answers RSS
0 Dnyaneshwar@Pune 604
1 thatraja 370
2 OriginalGriff 319
3 Sergey Alexandrovich Kryukov 241
4 Gihan Liyanage 194
0 OriginalGriff 737
1 Dnyaneshwar@Pune 604
2 Kornfeld Eliyahu Peter 505
3 Sergey Alexandrovich Kryukov 372
4 thatraja 370


Advertise | Privacy | Mobile
Web03 | 2.8.140902.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100