Subversion Repositories wimsdev

Rev

Rev 16512 | Rev 16581 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
16512 guerimand 1
!default step=1
2
 
3
!if $class_sendmailteacher=no
4
  error=sendmailteacherclose
5
  !reset job
6
  !exit
7
!endif
8
 
9
 
10
!if $step=1
11
  !if $target=supervisor
12
    !readproc adm/class/userdef ,$wims_class,
13
    tmp=!defof user_email,user_firstname,user_lastname in $userfolder/$wims_user
14
    sendermail=$(tmp[1])
15
    sendername=$(tmp[2]) $(tmp[3])
16
    tmp=!defof class_email,class_Supervisor,class_supervisor in wimshome/log/classes/$wims_class/.def
17
    !if $(tmp[2])=$empty
18
      recipientname=$(tmp[3])
19
      recipientmail=$(tmp[1])
20
    !else
21
      tmp=!defof user_email,user_firstname,user_lastname in wimshome/log/classes/$wims_superclass/.users/$(tmp[2])
22
      recipientmail=$(tmp[1])
16514 guerimand 23
      recipientname=$(tmp[2]) $(tmp[3])
16512 guerimand 24
    !endif
25
  !endif
26
!endif
27
 
28
!if $step=2
29
  !if $sendermail!=$empty
30
    !bound selfsend within 0,1 default 0
31
  !else
32
    selfsend=0
33
  !endif
34
  save_selfsend=$selfsend
35
  save_subject=!char 1 to 100 of $subject
36
  save_subject=!detag $save_subject
37
  !!  -------- for the moment use detag
38
  !!  script_data_input=!char 1 to 1000 of $msg
39
  !!!readproc adm/partialdetag.proc variable
40
  !! save_subject=$script_data_output
41
  save_msg=!char 1 to 1000 of $msg
42
  save_msg=!detag $save_msg
43
!endif
44
 
45
!if $step=3
46
    !mailto $recipientmail\
47
$sendermail\
48
[WIMS $wims_classname] $save_subject\
49
$save_msg\
50
<br/>\
51
#######<br/>\
52
Send by : $sendername<br/>\
53
#######<br/>  
54
 
55
 
56
  !if $save_selfsend=1
57
    !mailto $sendermail\
58
$sendermail\
59
[WIMS $wims_classname] $save_subject\
60
$save_msg\
61
<br/>\
62
#######<br/>\
63
Copy of message send to : $recipientname<br/>\
64
#######<br/>  
65
 
66
  !endif
67
  !if $wims_class!=$empty
68
    !set wims_module_log=class $wims_class: sendmail
69
    date=!translate : to . in $wims_now
70
    !appendfile wimshome/log/classes/$wims_class/.log $date $httpd_REMOTE_ADDR	$sendermail send mail to supervisor
71
  !endif
72
 
73
!endif
74
 
75
 
76