Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, May 18, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: Working with Outlook and Saleslogix from .NET
Christopher Morley
Posts: 21
 
Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 10:09 AM
fiogf49gjkf0d
I already posted this thread in the Scripting section, "My New .NET Notes/History User Control is Missing Drag-and-Drop Attachments from Outlook" so I'm not going to repost it here.

I will ask the simple questions here though:
How does Saleslogix get around the Outlook Security and extract attachments? Is there just a little setting in Outlook or the Reegistry you can tweak? Does it use MAPI? Either way, how do I get Attachments out of a MailItem or MapiObject easily? Can I call SlgxApi.dll from .NET to just do it for me, somehow?
[Reply][Quote]
Scott Sommerfeldt
Posts: 5
 
Re: Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 1:14 PM
fiogf49gjkf0d
SalesLogix Gets around this because it uses Extended MAPI Programming which does not Trigger Security Prompts.
For more info check here.
http://www.outlookcode.com/d/sec.htm

There are many ways around this. I prefer to use Outlook Redemption.

Cheers,

Scott Sommerfeldt
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 1:31 PM
fiogf49gjkf0d
As Scott mentioned, SLX uses Extended MAPI for this which won't cause the prompts. Extended MAPI can get hairy, so using a component to do this for you is a great way to go. Redemption is a great choice and easy to use. See http://www.dimastr.com/redemption/

For a 100% native .NET component, you could also use Security Manager (See http://www.add-in-express.com/outlook-security/). Equally as easy to use, but takes a different approach.
[Reply][Quote]
Christopher Morley
Posts: 21
 
Re: Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 2:25 PM
fiogf49gjkf0d
Thank you for your suggestions Scott and Ryan. I was able to access MailItem.Attachments after installing the free distribution provided here, http://www.mapilab.com/outlook/security/ , which I found after getting the Sue Mosher link and looking around in there, however I'm worried about the security implications of that plug-in since that shut it down completely across the board. I am going to try Redemption, and see if I can specify that my program is the only one that has access to by-pass Outlook security without warning. Either that, or try the MAPI route again.
[Reply][Quote]
Christopher Morley
Posts: 21
 
Re: Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 3:00 PM
fiogf49gjkf0d
Actually, I think the add-in that Ryan suggested, which I also came across the other day, is probably a better route than Redemption. Redemption is a cool option and probably more powerful and flexible, but also more difficult and complicated. I think I might take the blue pill on this one and just get the $149 Security Manager rather than Redemptions $199 red pill, or worse, the rare book that is out of print from the late 90s for $250+ rarely available used by Irving De la Cruz and Les Thaler!

http://www.amazon.com/dp/1572313129?tag=slipsticksystems&camp=211493&creative=379989&linkCode=op1&creativeASIN=1572313129&adid=0FZV5N3SXPYZB3VVDNN8&

also available on CD-ROM for just $192.36
http://www.amazon.com/Inside-MAPI-Irving-Cruz/dp/0970115806/ref=ed_oe_o/104-4783853-4351169

[Reply][Quote]
Christopher Morley
Posts: 21
 
Re: Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 3:55 PM
fiogf49gjkf0d
Nevermind. Just realized that Ryan and Sue have also recommended Redemption. Buying it. I will let you know how it goes.
[Reply][Quote]
Christopher Morley
Posts: 21
 
Re: Working with Outlook and Saleslogix from .NETYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 May 07 6:04 PM
fiogf49gjkf0d
It works. Redemption works. I feel like Doc Brown seeing the DeLorean go Back to the Future for the first time.
I actually haven't even purchased the redistributable license yet...

---

private void dataGridView1_DragDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Text))
{
e.Effect = DragDropEffects.Copy;
DataObject d = ((DataObject)e.Data);
String strCheck = "";
if (e.Data.GetDataPresent("Object Descriptor"))
{
try
{
MemoryStream myMem = new MemoryStream();
Byte[] myByte = new Byte[10000];
myMem = (MemoryStream)e.Data.GetData("Object Descriptor", true);
myByte = myMem.ToArray();
myMem.Close();
for (int i = 0; i < myByte.Length - 1; i++)
{
if (myByte[i] > 0)
{
strCheck += Convert.ToChar(myByte[i]);
}
}
}
catch (Exception ex7)
{
}
}
try
{
Outlook.MailItem myMailItem = null;
if (strCheck.ToLower().IndexOf("outlook") != -1)
{
Outlook.ApplicationClass myOlApp = new Outlook.ApplicationClass();
Outlook.Explorer myExp = myOlApp.ActiveExplorer();
myMailItem = (Outlook.MailItem)myExp.Selection[1];
myExp = null;
myOlApp = null;
}
else
{
}
if (myMailItem != null)
{
object oMissing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.NameSpace ns = app.GetNamespace("MAPI");
Redemption.RDOSessionClass rdoSession = new Redemption.RDOSessionClass();
rdoSession.MAPIOBJECT = ns.MAPIOBJECT;
Redemption.RDOAddressBook rdoAdd = rdoSession.AddressBook;
Redemption.RDOFolder rdoFld = rdoSession.GetDefaultFolder(rdoDefaultFolders.olFolderInbox);
RDOMail m = rdoSession.GetMessageFromID(myMailItem.EntryID, oMissing, oMissing);
richTextBox1.Text = m.Body;
for (int i= 0; i < m.Attachments.Count+1; i++) {
m.Attachments[i].SaveAsFile("C:\\"+m.Attachments[i].FileName);
}
}
myMailItem = null;
}
catch (Exception e2)
{

MessageBox.Show(e2.Message);
}
}
}

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/18/2024 2:30:12 AM