Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help for School - Send EMail

Status
Not open for further replies.

sbonnett

Programmer
Mar 20, 2004
3
US
I want to be able to send a copy of the form (either in the email or as a link) that a user has completed to his/her email address because they have to print it and send a printed copy of it with a check to the school.

I have created the form, and in it there is a field called txtEMail. I have created an action which should send an email to the user based on the field name above. However, it doesn't work on the web. Is there a way to easily make this happen in the web environment in Domino?

I have a very simple send mail agent, but it sends mail to the sendto (that I have configured)- it doesn't pick up the correct field from the form.

Speak slowly - I learn quickly. Thanks in advance.
 
I MIGHT have a solution. But I stress the might...

I have this sub in one of my databases, which creates a memo as a new document, rather than sending the document in view. Perhaps you can adapt it if you're LotusScript is better than mine!

Sub Sendmail(recips As Variant, sbj As String, bdy As String, linkdoc As Variant, linkmsg As String)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim bodyitem As NotesRichTextItem
Dim maildoc As NotesDocument

Set db = s.CurrentDatabase
Set maildoc = db.CreateDocument

maildoc.Form = "Memo"
maildoc.Subject = sbj
maildoc.sendTo = recips
Set bodyItem = maildoc.CreateRichTextItem("body")

Call bodyItem.AppendText(bdy)
Call bodyitem.AddNewline(2)
Call bodyitem.AppendDocLink(linkdoc, linkmsg)

Call maildoc.send(False)

End Sub

Whether this document link will work on the web, I don't know, sorry. I've never worked with web access, at least not yet! Perhaps you need to create a new form, which inherits the values from your form, and then sends itself as a memo - that way you can use the SendTo field on the new form to send it.

If you want to do this, simply replace "Memo" above with the name of your new form, and then make sure that all the right fields exist on your new form. Then you might have to set the maildoc.send to "True"... I'm a bit out of my league here, rather obviously, but I hope it helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top