added reply-to address
This commit is contained in:
parent
028db01314
commit
d01f5fc1bd
|
@ -2,10 +2,10 @@
|
|||
|
||||
# only for Russia!!!
|
||||
COUNTRY_CODE="7"
|
||||
SPOOLDIR="/srv/data/sms-outgoing/"
|
||||
|
||||
USER="smsd"
|
||||
GROUP="smsd"
|
||||
SPOOLDIR="/srv/data/sms/outgoing/"
|
||||
|
||||
if [ -z "$*" ]; then
|
||||
echo "Usage: ./sendsms.sh \"phone number\" \"message\""
|
||||
|
@ -40,13 +40,14 @@ if [[ ${#DST} != 11 ]]; then
|
|||
exit -1
|
||||
fi
|
||||
|
||||
SMS=$(mktemp /tmp/sms_XXXXXXX)
|
||||
FILENAME="/tmp/"`date +"%Y.%m.%d-%H:%M:%S"`"_${DST}.XXXXX"
|
||||
SMS=$(mktemp $FILENAME)
|
||||
chown :${GROUP} ${SMS}
|
||||
chmod 0666 ${SMS}
|
||||
|
||||
echo "To: ${DST}" >> $SMS
|
||||
echo "" >> $SMS
|
||||
echo $MSG >> $SMS
|
||||
echo -en $MSG >> $SMS
|
||||
|
||||
mv ${SMS} ${SPOOLDIR}
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@ $config['pr_fields'] = [
|
|||
// Admin email (this account will receive alerts when an user does not have an alternative email and phone)
|
||||
$config['pr_admin_email'] = 'postmaster@your.domain.com';
|
||||
|
||||
// Address to be indicated as reply-to in mail notifications
|
||||
$config['pr_replyto_email'] = 'postmaster@your.domain.com';
|
||||
|
||||
// Use secret question/answer to confirmation password recovery
|
||||
$config['pr_use_question'] = false;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class password_recovery_send {
|
|||
$sms_send_function = $this->rc->config->get('pr_sms_send_function');
|
||||
if ($sms_send_function) {
|
||||
if (is_file($sms_send_function)) {
|
||||
$ret = (int) exec("$sms_send_function $to $message");
|
||||
$ret = (int) exec("bash $sms_send_function $to $message");
|
||||
} else if (is_callable($sms_send_function)) {
|
||||
$ret = $sms_send_function($to, $message);
|
||||
}
|
||||
|
@ -126,9 +126,14 @@ class password_recovery_send {
|
|||
$body = strtr(file_get_contents($file), ['[LINK]' => $link, '[CODE]' => $confirm_code]);
|
||||
$subject = $this->pr->gettext('email_subject');
|
||||
|
||||
$from = $this->rc->config->get('pr_replyto_email');
|
||||
if(!$from){
|
||||
$from = get_email_from($this->rc->config->get('pr_admin_email'));
|
||||
}
|
||||
|
||||
$send_email = $this->send_email(
|
||||
$this->user['altemail'],
|
||||
$this->get_email_from($this->rc->config->get('pr_admin_email')),
|
||||
$from,
|
||||
$subject,
|
||||
$body
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue