Outlook message with inserted picture from command line - command-line

I often generate figure files (*.png) that I need to email to my coworkers. The communication is better if the image is embedded in the message body rather than attached. We all use Microsoft Outlook. It would make my life simpler if I could use the command line to open a new outlook message with a specified picture inserted in the body. The following command opens a new message and attaches the figure file,
outlook.exe /c ipm.note /a c:\temp\test.png
But instead I want the figure embedded in the body of the message. Suggestions?

Go to Tools -> Options -> Mail Format. Change it to Rich Text instead of HTML. Once the default Mail body has been changed if you run your command line the Attachments will be embedded in the mail's body.

Related

How to take screenshot of an Outlook.com email message?

With Gmail, you could print the message which opens a new window with just the email message, then you can use any screenshot Chrome extension to capture the entire page.
However Outlook.com messages are always in a frame(?) and screenshot tools can't scroll through the message. How would you save the email to an image file this way?
You can also use the print option in Outlook, and save as a PDF.
In the message preview, the three dots on the far right gives you a print version.
Only limitation here is it could mess with the design a little.
In the same three dots, mentioned above, there is also an option 'Open in a new window.' This isn't really the best solution as it annoyingly opens a popup, rather than another tab. This disadvantage here is that it doesn't allow you to use any screenshot browser extensions.
By far the best option is to use the 'Open in browser' link, if supplied in the email template. But obviously, not everyone is as helpful as that so it may not be an option supplied by the sender.
Sometimes opening in a browser only gives you a text document, not full HTML. However, you can ctrl + C to copy the full email and the ctrl + V to paste it into a blank Microsoft Word Document and then save as a PDF.
I have MS Outlook 2016 and it does not give me the option to save as a PDF from the print file.

Thunderbird draft gets saved automatically as text

In Word (or Excel) when I save and send the currently open file to my Email client (Thunderbird) a normal Email window gets opened and the file has been attached. Additionally an image containing my contact data is attached as my signature automatically and correctly. I can add text and change its format. So far the contents are in HTML.
Then I save a draft (I don't send out the Email!) and close the Email window. Later when I open that draft, the attached file (Word or Excel file) is still attached BUT my signature (the image file) is gone. The Email text looks like plain text content.
I am using Thunderbird 45.8.0 (the most current version) and Windows 7 Professional.
Appreciate any hints and ideas that could help!
This is simply a bug in Thunderbird.

powershell - link to attached file in mail message

I can't find the solution for my problem. So, in my send-mailmessage html body is field that should be redirected to file which is included as attachment in message. How can I create hyperlink to that file in mail, when client opens it?
I don't know if you get my idea. In other words, in message I have attached file, and then there is field which should be a hyperlink to attached file. When client receives message he/she should press the link and then attached file opens.
I searched almost everything in everwhere but can't find a appropriate solution how to solve this.
This isn't really a PowerShell question, since this issue has nothing to do with the functionality of the Send-MailMessage cmdlet.
In any case, the reason you can't find a solution anywhere is that what you're trying to do is impossible. There is no way that a hyperlink in an e-mail message can point to a file attached to that message. Different mail clients on different operating systems store attachments in different locations. Even if you want to assume that all your recipients are running Outlook on Windows, there are different versions of both. Even if you know for a fact that all recipients are running a specific version of Outlook on a specific version of Windows, you're still out of luck. Outlook stores attachments in a subfolder in the Temporary Internet Files in the user's profile that has a randomly generated name. There's no way to inject code into a hyperlink in an email message, so without knowing the exact local file location, you can't link to it.
I suppose if you're really determined you could have the hyperlink point to a web page that runs some complex javascript code that tries to figure out where the attachment is stored, but that's a major undertaking, and would break if the recipient's default browser has javascript disabled.
Which begs the question, why exactly are you trying to do this? So that recipients can click once instead of having to double-click to open the attachment?
I have found that you can make a hyperlink point to a file share that you know the recipients have access to.
To do so:
Simply make each hyperlink point to the specific file and there you have it.
They have to have permissions to access that file share, or there is a much better way now that I haven't thought of.
Oh well, this works for me, for now.

How do browsers communicate with email programs?

I've searched around for a bit, but haven't been able to find anything useful on this.
How do browsers communicate with email programs, such as Thunderbird and Outlook (on the Mac, if that's relevant)?
By communicate, I mean the process it goes through to create a new email window with a designated to address, subject, body, through the mailto: link. How does the browser let the email program know what to put for each field? Using the command line (for Thunderbird, at least) didn't make much sense, as that opens a brand new instance of Thunderbird on the Mac.
I haven't found any sort of API for this, so if someone can point me in the right direction, that would be greatly appreciated. Thanks!
On windows, the browser use the "default" email client defined by the system.
It's stored in the Windows registry and define the command line to open the mail program. You can find more info and an exemple on the Microsoft website.
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144109%28v=vs.85%29.aspx#sample_mail_program
If I look in my registry for thunderbird, It seems to execute:
"C:\Program Files\Mozilla Thunderbird\thunderbird.exe" -osint -compose "%1"
I have no idea how it works for the mac!
the additional information sent to the mail client is usually (from what i have seen) tacked onto the back of the mailto command.
in the following example, the client should automatically fill in the subject as 'greetings from stackoverflow'
mailto:hello#example.com?subject=greetings from stackoverflow
i have listed the other commands i know of below:
to edit subject: ?subject=
to edit cc: ?cc=
to edit bcc: ?bcc=
to edit body content: ?body=
these can also be used together by placing them after eachother and swapping the '?' for a '&', example
mailto:hello#example.com?subject=hello there&body=goodbye
this should create an email with the subject of 'hello there' and a body message of 'goodbye'
i hope this helps!
A very useful oldies that explains the surface called RCDefault
It shows you that the Finder or the Browser uses (can use) URLs to call other applications.
I am attaching the screenshot for the Mail application on OSX here:
The OS will then call this application with the URL (or file) and the application is supposed to understand how to open that URL.
The URL scheme for the mailto protocol for apple, is here
You should be able to find other schemes for the application you need to use.

Email sent by SAP Workflow has partial Web hyperlink

I think this might be a simple question but I cannot seem to figure it out.
I have a workflow which simply sends a mail. In the content of the mail I
have a hyperlink going back to our SAP CRM system. I pass some parameters to this hyperlink.
The workflow works fine and the email is sent, however, the hyperlink goes onto the second line of the mail and becomes in active. If I copy the entire hyperlink and paste it in a browser it works.
The issue is I don't want users to copy and paste, I simply want them to click on the hyperlink.
Here is a screen print of what I am talking about
http://img402.imageshack.us/img402/9471/38348167.png
And here is a screen print of the actual email that is sent:
http://img210.imageshack.us/img210/6424/14370746.png
I tried going into transaction PFTC (Task Maintain) I entered my task and opened it up. I went to the tab description
and hit the edit button and I changed the tag column to continuous text but that didnt work, and then I tried extended line
and that too didn't make a difference.
Here is a screen shot of that:
http://img341.imageshack.us/img341/6254/37776438.png
My question is, is there any way to get the hyperlink on one line or even to have it be clickable on 2 lines?
Thanks so much.
From what I can see, that's a limitation of SAPconnect when sending plain-text emails. You could reconfigure the system to send HTML mails, but this would affect EVERY outgoing mail and should be handled extremely cautious. I'd suggest you write a small class to assemble and send the HTML mail and call it from the step. I'd use the BCS for sending the mail - it has an excellent online documentation and comes with several demo programs (BCS_EXAMPLE_*). You could assemble the HTML body using ABAP, although this usually yields rather messy code. Cleaner ways of ding this would be to either put all of the input data into a structure and use a simple transformation or dynamic documents (see for example report DD_ADD_LINK).