Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

sending documents on the web through emails using domino

Posted on 2004-08-17
19
Medium Priority
?
311 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 2000 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

972 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