Solved

Lotus notes @mailsend as lotusscript

Posted on 2012-03-12
5
1,198 Views
Last Modified: 2013-12-18
I have a form with the following fields:-
Form Name: leasetracemail
ltto (text)
ltcc (text)
ltfbcc (text)
ltsubject (text)
ltbody (rich text)
trailer(text)

the rich text field can contain attachments and I am tryinmg to use the @mailsend as follows:
@MailSend(ltto;ltcc;ltbcc;ltsubject;"";ltbody:trailer);

However @mailsend does not work with rich text fileds for attachments.  I beleive that I need to use Lotusscript to do this but am not a Lotussscript programmer.  Can anyone translate the mailsend command (to use on a button) as Lotusscript please?

Thanks
Pete
0
Comment
Question by:peadarmac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 37712551
First, try to use

      @MailSend(ltto;ltcc;ltbcc;ltsubject;"";"ltbody":"trailer");

The 6th parameter is, according to the help: "The names of one or more fields from the current document that you want included in the mail memo. "
0
 

Author Comment

by:peadarmac
ID: 37713546
Hi sjef_bosman,  the @mailsend works fine if the ltbody field is a simple text field.  The problem is if I make it a rich text field and attach a document it does not work.  Putting the sixth parameter in quotes just send ltbody as a literal string.  Really need to do this with script I reckon.  Thanks.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 37713593
I can confirm that the 6th parameter must be a text-list of field names. But if you say it doesn't work, I believe you ;-)

In LotusScript (assuming that the current document is opened AND is not a new document, i.e. it's been saved to disk):

Dim ws As New NotesUIWorkspace
Dim ns As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim maildoc As NotesDocument
Set db= ns.CurrentDatabase
Set doc= ws.CurrentDocument.Document
Set maildoc= New NotesDocument(db)
maildoc.Form= "Memo"
maildoc.SendTo= doc.ltto
maildoc.CopyTo= doc.ltcc
maildoc.BlindCopyTo= doc.ltbcc
maildoc.Subject= doc.ltsubject
Call doc.CopyItemToDocument(maildoc, "Body")
Call maildoc.Send(False)
0
 
LVL 4

Accepted Solution

by:
cohalex earned 500 total points
ID: 37713613
You need to rename your fields on the form to:

ltto (text) -> SendTo (text (multivalue))
ltcc (text) -> CopyTo (text (multivalue))
ltfbcc (text) -> BlindCopyTo (text (multivalue))
ltsubject (text) -> Subject (text)
ltbody (rich text) -> Body (rich text)

If you cant simply rename them, create the new fields as computed and take the values from the original ones.
Body should be renamed though.

On your Send button in LS, you could have:

      Dim ws As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      
      Set uidoc = ws.CurrentDocument
      Call uidoc.Send()
0
 

Author Closing Comment

by:peadarmac
ID: 37716473
Exactly what I needed..simple and straightforward..Thx
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 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