Solved

Send image in email body for Lotus Notes

Posted on 2013-12-16
5
975 Views
Last Modified: 2013-12-22
I already have a little script that reads email addresses from an Excel file and then send the email. What I need to do is to have an image (not as attachment) be in the email body.

I've used a few tricks ,like having the image as a signature (which works fine) , but then I can't add a Disclaimer after that.

Also, I've created a draft with the Image and Disclaimer already in tehre. But I don't knwo how to open a draft in VBScript and next send it to a list of people.

I need help .

Cheers
0
Comment
Question by:Bianchi928
  • 2
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39723161
Your image will need to be hosted and then you will need to build your email.

theHtml=""
theHtml=theHtml&"This is my image below<br>"
theHtml=theHtml&"<img src=""http://mysite.com/images/xyz.jpg""><br>"
theHtml=theHtml&"You can also click on this image<br>"
theHtml=theHtml&"< href=""http://msite.com/page2.html""><img src=""http://mysite.com/images/xyz.jpg""></a>"

Open in new window


In your html.body, you will use the variable, theHtml.  When you build your html like this, I find avoiding all white space is key. Some email clients will treat white space not as expected and sometimes break the html code when it is rendered.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 39723577
Ain't going to work like that. You have to use the MIME methods in Notes to send an embedded image. Maybe this example can put you on the right track: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Sending_an_email_with_a_custom_%E2%80%9Csender%E2%80%9D_via_MIME
0
 

Author Comment

by:Bianchi928
ID: 39725167
Thanks for the replies...

Following new issues here, is it possible for any of you to guide me thru retrieving an email sitting in my draft folder which already include the image and disclaimer and use my list of recipients.

Thanks
Cheers
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 400 total points
ID: 39725345
If the email is completely ready to be sent, and you know which mail it is (how?), all you need to do is fetch it as a NotesDocument and use the Send method to send it out.

I think you used the COM interface to Notes before, so I suppose you can do the coding. Here some pseudo-code:

get the mail database
get the Drafts view
get the first document in the view (assuming it's the one you intend to send)
and send it

You might find more clues in the example on this page: http://www.ozgrid.com/forum/showthread.php?t=172223
0
 

Author Closing Comment

by:Bianchi928
ID: 39734942
That's what I was looking for.. Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question