File: sendmail.proc

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (109 lines) | stat: -rw-r--r-- 2,387 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109

cnt_user=!itemcnt $sending_mail
!reset username teachername login teachername

!! don't send supervisor mail in case of wims_mail_hidden=yes
!if $wims_mail_hidden=yes
  sender=$empty
  !if $wims_superclass=$empty
    localclass=$wims_class
  !else
    localclass=$wims_superclass
  !endif
  localtype=authparticipant
  noreply1=\
\
$name_noreply
  !if $wims_realuser=supervisor
    localtype=authsupervisor
    noreply2=\
\
$name_noreply
  !else
    noreply2=$noreply1
  !endif
!else
  sender=$supervisormail
  noreply1=$empty
  noreply2=$empty
!endif

!for l_ =1 to $cnt_user
  u=!record $l_ of wimshome/sessions/$wims_session/.userlist_mail
  username=!append item $(u[1]) $(u[2]) to $username
  login=!append item $(u[3]) to $login
!mailto $(u[4])\
$sender\
[WIMS $wims_classname] $save_subject\
***\
$name_sendby ($(name_suptype[$supervisortype]))\
***\
$save_msg\
$noreply1\

  !reset u
!next l_


!! --------- preparing msg for teacher and supervisor
nbuser=!recordcnt wimshome/log/classes/$wims_class/.userlist
!if $nbuser>$cnt
  msgmod=$save_msg\
<br>\
#######<br>\
$(name_sendto[1]) : $username<br>\
#######<br>\
<br>

!else
  msgmod=$save_msg
!endif

!if $save_sendotherteacher=1
  !! ----------- send copie msg to teacher of the class
  cnt_teacher=!recordcnt wimshome/sessions/$wims_session/.userteacher_mail
  !for l_ =1 to $cnt_teacher
    u=!record $l_ of wimshome/sessions/$wims_session/.userteacher_mail
    login=!append item $(u[3]) to $login
    teachername=!append item $(u[1]) $(u[2]) to $teachername
    !mailto $(u[4])\
$sender\
[WIMS $wims_classname] $save_subject\
***\
$name_sendby ($(name_suptype[$supervisortype]))\
***\
$msgmod\
$noreply1\


    !reset u
  !next l_
!endif

!if $save_selfsend=1
  !! ----------- send copie msg to supervisor of the class
  !if $cnt_teacher>0 and $save_sendotherteacher=1
    msgmod=$save_msg\
<br><br>\
#######<br>\
$(name_sendto[2]) : $teachername<br>\
#######<br>

  !endif
  login=!append item supervisor to $login
    !mailto $supervisormail\
$sender\
[WIMS $wims_classname] $save_subject\
***\
$name_sendby ($(name_suptype[$supervisortype]))\
***\
$msgmod\
$noreply2\

!endif

!set wims_module_log=class $class: sendmail
date=!translate : to . in $wims_now
!appendfile wimshome/log/classes/$wims_class/.log $date $httpd_REMOTE_ADDR	$supervisormail send mail to $login

!reset sending_mail method select_user loginlist