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
Solved

Lotus notes @mailsend as lotusscript

Posted on 2012-03-12
5
1,174 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
  • 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 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