Solved

sending documents on the web through emails using domino

Posted on 2004-08-17
19
302 Views
Last Modified: 2013-12-18
hi all,

I want to send an web email that contains a coverletter and resume.Here is the description:

For my website, I have a Resume submission aplication form with a " rich text field "(to type coverletters), a "file upload control" (to upload resumes) and a "submit button".

When user clicks on submit, the rich text field and the document in the file upload control should reach a destination email address.

Can i write an agent to do this? Are there any online resources that describe how to do this ?

thanks,
Jay

0
Comment
Question by:jaggernat
  • 9
  • 8
  • 2
19 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 11827437
Place this is in an agent:

Sub Initialize
      Dim session As New NotesSession
      Set db = session.CurrentDatabase
      Set maildoc = db.CreateDocument
      Dim doc As notesDocument
      Dim rtitem As NotesRichTextItem
      Dim Body As NotesRichTextItem
      
      Set doc = session.DocumentContext
%REM
> >      doc.Form = "BackupRequestForm"
> >      doc.SendTo = doc.ReportingTo(0)
> >      doc.Subject = "Domino Application"
> >      Call doc.send(True)
%END REM
      tmpreqname=doc.name_x(0)
      tmpreqcomp=doc.compname_x(0)
      tmpcontact=doc.contact_x(0)
      
      maildoc.Form = "Memo"
      'maildoc.SendTo = doc.ReportingTo(0)
      maildoc.SendTo = doc.staff1_x(0)
'      maildoc.CC=doc.staff2_x(0)
      maildoc.Subject = "You have a new request from "+tmpreqcomp
      Set Body=New NotesRichTextItem(maildoc,"Body")
      Set rtitem = New NotesRichTextItem( maildoc, "Body" )
'Call rtitem.AppendDocLink( doc, db.Title )
      message="Please review new request from "+ tmpreqname+" from "+tmpreqcomp+"."
      Call rtitem.AppendText(message)
      Call Body.AddNewLine(2)
      Dim rt As Variant
      Set rt = doc.GetFirstItem ("YourUploadFieldName") 'RTF field
      Call rtitem.AppendRTItem ( rt )
      message1="Click here to open the form=========>>"
      Call Body.AppendText(message1)
      Call Body.AppendDocLink(doc,"Please Click this Link to open the Document")
      Call maildoc.send(False)
      'Msgbox"Mail Send "
      'Wend
      Print "processed"
End Sub


Manually from Actiosn menu
Run Once @Comamnds....
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 500 total points
ID: 11827788
and a simple agent :
1. Create an Agent (i.e. agnSendMail) triggered from the agent list, Run Once options.
2. Paste the code below
3. In a button or hotspot of your form add the following:
@Command([ToolsRunMacro]; "(agnSendMail)")


'Agent Code
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim memo As notesdocument
Dim webdoc As notesdocument
Set db = s.currentdatabase
Set webdoc = s.documentcontext
Set memo = New notesdocument(db)
Call webdoc.CopyAllItems(memo, True)
memo.form = "Memo"
memo.SendTo = webdoc.Email(0)
memo.CopyTo = webdoc.CreatedBy(0)
memo.Principal = webdoc.CreatedBy(0)
memo.Subject = webdoc.subject(0)
memo.Body = webdoc.Body
Call memo.Send(True)

End Sub
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11830480
Follow this simple steps.

1. Create two hidden fields
MailOptions and set value to "1"
SendTo (multivalued for more than one person) WITH recepient names

2. Enable form property store form in document & save the form

Now when user uses this form to submit it will send the mail to the users listed in SendTo Field

~Hemanth

0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 10

Author Comment

by:jaggernat
ID: 11834487
Hello hemanth,

that sounds simple .. but a little bit of clarity would help.
where should i enter the email(s) in the SendTo field??

Will this procedure send the "rich text field" and the "file upload control document"  to the recipient ?  

thanks,
Jay
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11841246
Sorry I couldn't get back to you.. hope you got what you need
0
 
LVL 10

Author Comment

by:jaggernat
ID: 11842161
No, i did not. I wnated to know where to enter the recipient email address in the SendTo field?

I will greatly appreicate your responce.


J
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11842236
It is a field and hidden.. You have to hard code it.

It will send whole form, when you enable store form in document.
0
 
LVL 10

Author Comment

by:jaggernat
ID: 11843550
By "hard code" , you mean setting value of the field, or what?

thanks,
J
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11843917
yes.. setting the default value to whom ever want to receive the mail after submitting the form
0
 
LVL 10

Author Comment

by:jaggernat
ID: 11845240
This is just not working. I did exactly what you said.

Have a MailOptions field and set value to "1"  (hidden)

SendTo field with recepient names (hidden).



Does this work on the web or just on NOTES?


Do i have to configure any thing else?

thanks,
Jay.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11845546
both web and notes.

Where is this web server ? if your web server cannot talk to the mail server then you can't send mail. ROuter task should be running on web server if not atleast smtp should run (in this case use internet address).
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11845549
also leave the fields as editable...and try
0
 
LVL 10

Author Comment

by:jaggernat
ID: 11846255
I am working on a client machine connected to Domino server. The Database is stored in the server.

How can i make the web server talk to the mail server?

Thank you
J

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11851134
How do you test mailing in your web server .. eg: How does your scheduled agent sends mail on this web server ?? Mostly use smtp to route mail when disconnected from the mail mail server.. so that the mail is send to internet and received by mail server from internet.

Does your web and mail server share same address book ? If so they can see each other ?
0
 
LVL 10

Author Comment

by:jaggernat
ID: 11855046
excellent solution ..the email is passing now .but another problem..

the rich text field is not showing up .

Also when i click on the attachment it says :

Response Message
HTTP Web Server: Item Not Found Exception
 

any help would be greatly appreciated.


thanks so much,
J
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11855476
Name the richtext field as Body.. this should match up with the mail format. Also create Subject field to define the subject.

About the attachment .. I am not sure why you are getting that error. It could be that attachment is not sent by the router or stripped by virus scanner.
0
 
LVL 10

Author Comment

by:jaggernat
ID: 11856789
hey it works perfect now ....Hats off to you..

J

0
 
LVL 10

Author Comment

by:jaggernat
ID: 11856835
Hello Hemantha,

I wanted to ask this to you. I have a good experience in designing web applications in Lotus Domino. Now , i want to move a step forward and start using java in my applications. What you think is the best web resource or book i can get started with. I have used java before but not with Lotus Domino.


Regards,
J



0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11859557
Cost effective - Notes help and redbooks

If you are willing to shed some money - then try Domino Development with Java by Anthony Patton

Still I would always prefer to goto lotus and ibm sites for tutorials on using java in domino and then start with rebooks.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 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