Skip to content

twhtanghk/WebNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebNotes

Restful Web Service for sending mail via Lotus Notes Client

Restful API to interface with Lotus Notes Client

  • mail
    post api/mail - send lotus notes mail with the following parameters
    	to:			comma delimited list of recipients
    	cc:			comma delimited list of copy-to recipients
    	bcc:		comma delimited list of blind copy-to recipients
    	subject:	subject to be shown in the lotus notes mail
    	body:	 	mail body text in html or plain text

Configuration

	set root=%HOMEDRIVE%%HOMEPATH%\prod\WebNotes
    set PORT=3000
  • update environment variables in mail/env.py
    • set server DEBUG to True or False (default: False)
    • set KEEPRECORD of sent mail to True or False (default: False)
    • set allowed client in ALLOWED_HOSTS (default: ['localhost', '127.0.0.1'])
    • set log level of system access log (default: INFO)
    DEBUG = False
	KEEPRECORD = True
    ALLOWED_HOSTS = ['localhost', '127.0.0.1']
    LOGGING = {
	    'loggers': {
	        'app': {
	            'handlers': ['file'],
	            'level': 'INFO',
	            'propagate': True,
	        },
	    }
	}
  • start the web service and input 'no' for not creating admin account
	.\start.bat

Testing

  • Command: send mail via Web Service
	curl -v --noproxy -X POST -d 'to=a@abc.com,b@def.com&cc=c@ghi.com&subject=subject a&body=body a' http://localhost:3000/mail/api/mail/
  • HTML Form: open the file 'client/html/mail.html' with browser, complete the form, and click send button to send mail via Web Service

  • Groovy

	groovy -jar client/groovy/Notes.jar 'to list' 'subject' 'body' 'cc list' 'bcc list'
  • Java: See client/java/client/Notes.java
	cd client/java
	javac -cp ../groovy/Notes.jar client/Notes.java
	set CLASSPATH=.;../groovy/Notes.jar
	java client.Notes 'to list' 'subject' 'body' 'cc list' 'bcc list' 

About

Restful Web Service for sending Lotus Notes Mail

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors