SHOW:
|
|
- or go back to the newest paste.
1 | Load mod_sendmail to Apache/httpd on CentOS 6.5 | |
2 | ||
3 | Location : /etc/httpd/conf/httpd.conf | |
4 | ||
5 | - | LoadModule sendmail_module modules/mod_sendmail.so |
5 | + | LoadModule sendmail_module modules/mod_sendmail.so |
6 | ||
7 | ||
8 | ###################################################### | |
9 | Location : /etc/httpd/conf.d/sendmail.conf | |
10 | ||
11 | <Location /sendmail> | |
12 | ||
13 | # protect against open relay | |
14 | Order Deny,Allow | |
15 | Allow from all | |
16 | #Allow from 127.0.0.1 | |
17 | ||
18 | # simple configuration | |
19 | SetHandler sendmail | |
20 | SendmailName /usr/sbin/sendmail | |
21 | SendmailArguments -t -i | |
22 | ||
23 | </Location> | |
24 | ||
25 | ######################################################### | |
26 | Test it with curl : | |
27 | ||
28 | curl -X POST -d "Skuska http web service rest API" -H "Content-Type: text/plain" \ | |
29 | -H "To: ja@ja.sk" -H "Cc: ja@ja.sk" -H "From: ja@ja.sk" \ | |
30 | -H "Subject: Skuska Mail WS 222" http://localhost/sendmail |