File tree Expand file tree Collapse file tree 4 files changed +71
-3
lines changed Expand file tree Collapse file tree 4 files changed +71
-3
lines changed Original file line number Diff line number Diff line change
1
+ import org.apache.log4j.Level ;
1
2
// locations to search for config files that get merged into the main config;
2
3
// config files can be ConfigSlurper scripts, Java properties files, or classes
3
4
// in the classpath in ConfigSlurper format
@@ -120,10 +121,12 @@ log4j = {
120
121
' net.sf.ehcache.hibernate'
121
122
122
123
// Enable the Asynchronous Mail plugin logging
123
- trace ' grails.app.jobs.grails.plugin.asyncmail' , ' grails.app.services.grails.plugin.asyncmail'
124
+ trace ' grails.app.jobs.grails.plugin.asyncmail' ,
125
+ ' grails.app.services.grails.plugin.asyncmail' ,
126
+ ' grails.plugin.asyncmail'
124
127
125
128
// Enable the Quartz plugin logging
126
- debug ' grails.plugins.quartz'
129
+ debug ' grails.plugins.quartz'
127
130
}
128
131
129
132
grails {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ class UrlMappings {
7
7
}
8
8
}
9
9
10
- " /" (view : " /index " )
10
+ " /" (controller : ' mail ' )
11
11
" 500" (view :' /error' )
12
12
}
13
13
}
Original file line number Diff line number Diff line change @@ -3,4 +3,15 @@ package sample
3
3
class MailController {
4
4
5
5
def index () {}
6
+
7
+ def send (){
8
+ sendMail {
9
+ from params. from
10
+ to params. to
11
+ subject params. subject
12
+ text params. body
13
+ }
14
+
15
+ redirect(controller : ' asynchronousMail' , action : ' list' )
16
+ }
6
17
}
Original file line number Diff line number Diff line change
1
+ <%@ page contentType =" text/html;charset=UTF-8" %>
2
+ <html >
3
+ <head >
4
+ <meta http-equiv =" Content-Type" content =" text/html; charset=UTF-8" />
5
+ <link rel =" stylesheet" href =" ${ resource(dir: ' css' , file: ' asyncmail.css' , plugin: ' asynchronous-mail' ) } " />
6
+ <title >Send a new message</title >
7
+ </head >
8
+ <body >
9
+ <%-- Header --%>
10
+ <h1 >Edit Asynchronous Mail Message</h1 >
11
+
12
+ <%-- Navigation --%>
13
+ <div class =" nav" >
14
+ <span class =" menuButton" ><a class =" home" href =" ${ resource(dir: ' ' ) } " >Home</a ></span >
15
+ <span class =" menuButton" ><g:link class =" list" controller =" asynchronousMail" action =" list" >List</g:link ></span >
16
+ </div >
17
+
18
+ <%-- Flash message --%>
19
+ <g:render template =" /asynchronousMail/flashMessage" />
20
+
21
+ <div class =" body" >
22
+ <g:form method =" post" action =" send" >
23
+ <table >
24
+ <tbody >
25
+ <tr class =" odd" >
26
+ <td class =" fieldName" >From:</td >
27
+ <td ><g:textField name =" from" /></td >
28
+ </tr >
29
+
30
+ <tr class =" even" >
31
+ <td class =" fieldName" >To:</td >
32
+ <td ><g:textField name =" to" /></td >
33
+ </tr >
34
+
35
+ <tr class =" odd" >
36
+ <td class =" fieldName" >Subject:</td >
37
+ <td ><g:textField name =" subject" /></td >
38
+ </tr >
39
+
40
+ <tr class =" even" >
41
+ <td class =" fieldName" >Body:</td >
42
+ <td ><g:textArea name =" body" /></td >
43
+ </tr >
44
+ </tbody >
45
+ </table >
46
+
47
+ <div class =" buttons" >
48
+ <span class =" button" ><g:submitButton class =" save" name =" Send" /></span >
49
+ </div >
50
+ </g:form >
51
+ </div >
52
+
53
+ </body >
54
+ </html >
You can’t perform that action at this time.
0 commit comments