How does one put images into a Lotus Notes email generated from the command line? - powershell

I'm able to use this method to generate emails, but is there a way to include images in the emails from the command line? Maybe using base64 encoding or something like that?
I've also seen a few copy/pastes where I ended up with <324d21q.jpg> and I wonder if that has something to do with it.

Related

LotusNotes: saving documents as email files

I need to ask you about the possibility of saving LotusNotes documents (with the attachments) as separated files in EML format on a hard disc.
Of course it's not important to keep the original document's look but it's very important to input into the file the content of the notes document including all the attached files.
The reason is to be able to open the exported file in an email client.
Is it possible?
Do you have any experience with resolving a problem like this?
The easiest way to do this for a small number of documents is to use #MailSend to forward the documents to a Notes user account or to mail-in database, and then go into that mailbox, select the message, and drag it to your desktop. Recent versions of the Notes client will save the document as .eml file that can be opened in Outlook or other standard mail clients. Or instead of sending to something in Notes, you could send to a non-Domino email system, connect with Outlook and do the same drag-to-desktop there, which I believe results in a .msg file instead of a .eml file, but they're essentially the same.
To automate it for a large number of documents that I need to do in one batch, I might still use the #Mailsend approach, but I'd do this on a dedicated Domino server. I'd address the email to an external address, and I'd set up SMTPSaveOutboundToFile=1 in the notes.ini file of that dedicated Domino server.
I think the Notes-client drag to desktop operation results in somewhat higher fidelity in the .eml file than either of the other approaches, but it's been about ten years and three major Notes/Domino versions since I played around with any of these.
Yes this can definitely be done programmatically. To do this, convert the doc to MIME via convertToMIME() using the DxlExporter to do the rest of the work. It creates XML output that contains a <mime> tag in which the output of the fully converted MIME format document resides. See this for a full description: How to Programmatically Convert Lotus Notes email Document to MIME Format

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.

perl excel to pdf

I'm using perl with an excel template to try to make creating invoices for clients somewhat automated. My only issue is that I'd really like to be able to convert this excel file to a PDF when I'm done, but I can't seem to find any perl modules that do anything of the sort. Anyone ever heard of something like this being done? I know it can be done somehow, since word and open office manage to do it!
Simply shell out to unoconv.
There are also Perl bindings to UNO, but last time I looked, they didn't work.
You may have to convert/flatten the Excel file first, and then figure out a way to pipe it in, but this may get you headed in the right direction http://metacpan.org/pod/PDF::Create

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).

how do I set a Thunderbird signature to use a dynamic url's html?

I want to use a dynamic email signature in Thunderbird, that is context aware (depends on date, events in db, etc.)
If I have a PHP that can generate the signature html (i.e. http://www.site.com/email_sign.php)
how do I force Thunderbird to use it?
(the only options I see are using static html (whether inline, of from a local system file).
any ideas?
You can use the Signature Switch add-on and a batch file calling wget to achieve what you want. I wrote a simple executable to replace the bat file; you can read about it (and download it if you want to) from http://www.else.co.nz/portfolio/020-code/dynamic-email-signatures
I doubt you can do this simply. Thunderbird does allow scripting via the creation of plugins but I wouldn't personally know how do do it or how easy it might be.
Best answer I can think of would be to set a scheduled task / cron job to download the php to a local file then follow the instructions in the knowledge base, namely:
You can use Thunderbird to create signature files, or you can use your operating system tools to create them—for example, a plain text editor.
Thunderbird does not provide any
special place to store signature
files. You could create a Signatures
directory in your profile to store
them, making them easy to back up
along with the rest of your profile.
Or you could store them somewhere
else.
To use a signature file, specify it in
Account Settings as the signature for
an identity. Check the box "Attach the
signature from a file instead" and
specify the signature file.
This will work unless Thunderbird caches the HTML internally, however I see no indication in the FAQ that this is the case.
For years I updated the signature for my email client manually – until I got fed up… That’s why I wrote a PHP script to create a randomized signature block automatically from an RSS feed! Check it out: https://github.com/birdy1976/signature :-D