I am using C# and need to attach a lnk (shortcut/link) file and email it to a lotus notes account. The problem is the icon defaults to a generic image and does not show the folder with the arrow as seen in Windows Explorer. A txt file icon does display as expected. I would like to control the appearance of that icon after it has been received. Can this be done through C# or is the Notes server the problem?
I think you are asking how to control the appearance of the icon once it arrives in the recipient's mail.
I do remember (from when we were on Notes here at work) that the icon was specific to the sender as opposed to the recipient (i.e. if I send you a Word document and I have Word 97 installed and you have 2003 installed, you'll see the Word 97 doc icon). But this appeared to be a function of the fact that I, the sender, was using Notes as the sending client. However, I think you may not be able to do what you want to do as one would assume you are sending regular SMTP e-mail. Assuming you are sending e-mail through the Notes server's SMTP interface, I don't believe you'll be able to control how the link appears on the recipient's side.
Related
I want to open the default mail client registering on Windows and create an email with an attachment.
The behaviour is just like when you right click on a file, the Send to -> Mail Recipient. Or when you compressing a folder and select 'compress and email' on the context menu.
I have tried:
mailto:xxx#example.com, which doesn't accept attachment.
MAPI, which works well when the outlook is shutdown, but doesn't work when the outlook is currently working. Do you know how to make it work?
Do you have any other ideas?
Thanks!
Depending on the version of your mail client, try to add &attach="C:\some_file.txt to the end of mailto:xxx#xxx.com. This should add an attachment when the mail client opens. If attach does not work, try attachment in stead. I wonder if you can't add both.
I'd like add to my app function allowing sending email via Outlook same as eg Adobe Reader does.
So after pressing email button I'd like to see Outlook's native 'new mail' window with my document attached in.
Any idea how to archive that?
Why not interop?
http://support.microsoft.com/kb/819398
Not quite a solution, but more of a hint: maybe creating an *.eml file with your attachment and opening it (as a new mail window) would help?
I have *.shb file (probably document link) from Lotus Notes and I need to map it somehow to concrete e-mail and then process it. How can I receive mail from *.shb?
Note: I use C#, but it could be in any language.
shb is a shortcut that opens a specific document in Windows when double-clicked; executed by the Windows Shell Scrap Object Handler (shscrap.dll).
It's similar to a .LNK file, but not as commonly used; also known as a "Windows Shortcut into a Document."
See here, maybe this thread will provide more info:
http://blogs.msdn.com/b/oldnewthing/archive/2007/11/12/6122832.aspx
So, apparently, the shb file is created when you drag-and-drop a Notes document into a Windows context.
What do you see when you open a shb file in text editor?
If you can see some of the formats like this
- Link description:
Application 'MailDb', View 'Inbox', Document 'Doc Subject'
- db replica ID:
C125722E:00342CBB
- View id / Document ID:
OF38D45BF5:E8F08834-ON852564B5:00129B2C
you could construct URLs that would open in either web browser or Lotus Notes client and open the database > view > document by appending this to your Domino server's url (for web browser) or to "notes://server" (for Notes client) :
/Database/View/Document?OpenDocument
See here for more info on Lotus Domino URL construction rules:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.designer.domino.main.doc/H_ABOUT_DOMINO_URL_COMMANDS_4332.html
This is really odd that I can't seem to find out how to do this, so I'm wondering if I'm missing something obvious.
I'm wanting to put a menu on our application like is found in Word and Excel, File -> Send To -> Mail Recipient (As Attachment)
Our requirements are to create and display the email with the attachment, just like Word and Excel do, not to send it automatically.
We used to be able to save the file to the temp folder and use:
Shell.Execute("mailto:my.email.com?subject=File&attachment="c:\temp.txt");
I've tried the &attach, &attachment in both VB.NET and C# with quotes, double quotes, etc. I've also tried System.Net.Mail but don't see anywhere that you can display the email, it only seems to be able to create and send.
We can't assume a default email client, it could be Outlook Express, Outlook version 2000, 2003, or 2007, or lotus notes, or ... Don't know. We have a commercial application so I don't think we can assume a specific application. Like MS Word, it needs to work for whatever is installed (or isn't installed).
I've done this using Outlook interop from Visual Studio Tools for Office:
using IntOut = Microsoft.Office.Interop.Outlook;
...
IntOut.Application app = new IntOut.Application();
IntOut.MailItem item = (IntOut.MailItem)app.CreateItem(
IntOut.OlItemType.olMailItem);
item.Subject = "Hello world";
item.Body = "Hello!";
item.Display(false); // set to true to make mail window modal
You can find some samples on MSDN here.
For the general case, there isn't a way to do this. Here's Microsoft's documentation: http://msdn.microsoft.com/en-us/library/aa767737(VS.85).aspx
If you can provide the mail client, you may get a better answer.
I'm new to the world of C# programming but was hoping someone could help me out.
I'm trying to use C# to open up a blank email in Outlook with a specified attachment.
In other words, open the email, the TO: and SUBJECT: fields are blank but the email has an attachment that is specified in my code. I want my user to be able to modify the email and send to whatever users s/he specifies. I know for sure that we have Exchange....so any ideas?
There are a number of way you can do this.
Create an Outlook addin that opens a new mail with the attachment you want via say a new toolbar button.
Do the same in Outlook VBA macro ..
Also you could create a new form with the attachment in it already and then just us that form.(but the attachment will be hard coded etc.)
Does the attachment change ? or is it the same one evey time ? what outlook version are you using ? What are you programing capabilties ?
76mel
I don't think exchange will help you much, you need to work with outlook on the users machine. You can add a reference to the Outlook interop assemblies, should be in the Com tab of your add references dialog.
Here's some links to jump start you.
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.aspx
http://www.microeye.com/resources/res_tech_vsnet.htm
Good Luck!