Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
f7d5f95d
Commit
f7d5f95d
authored
7 years ago
by
Thijs Kinkhorst
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #684 from tvdijen/patch-email-from
Add sendmail_from option
parents
1f4b6e84
5a666cb2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config-templates/config.php
+7
-0
7 additions, 0 deletions
config-templates/config.php
www/errorreport.php
+13
-2
13 additions, 2 deletions
www/errorreport.php
with
20 additions
and
2 deletions
config-templates/config.php
+
7
−
0
View file @
f7d5f95d
...
...
@@ -76,6 +76,13 @@ $config = array(
'technicalcontact_name'
=>
'Administrator'
,
'technicalcontact_email'
=>
'na@example.org'
,
/*
* The envelope from address for outgoing emails.
* This should be in a domain that has your application's IP addresses in its SPF record
* to prevent it from being rejected by mail filters.
*/
//'sendmail_from' => 'no-reply@example.org',
/*
* The timezone of the server. This option should be set to the timezone you want
* SimpleSAMLphp to report the time in. The default is to guess the timezone based
...
...
This diff is collapsed.
Click to expand it.
www/errorreport.php
+
13
−
2
View file @
f7d5f95d
...
...
@@ -101,10 +101,21 @@ $email = trim($email);
// check that it looks like a valid email address
if
(
!
preg_match
(
'/\s/'
,
$email
)
&&
strpos
(
$email
,
'@'
)
!==
false
)
{
$replyto
=
$email
;
$from
=
$email
;
}
else
{
$replyto
=
null
;
$from
=
'no-reply@simplesamlphp.org'
;
}
$from
=
$config
->
getString
(
'sendmail_from'
,
null
);
if
(
$from
===
null
||
$from
===
''
)
{
$from
=
ini_get
(
'sendmail_from'
);
if
(
$from
===
''
||
$from
===
false
)
{
$from
=
'no-reply@example.org'
;
}
}
// If no sender email was configured at least set some relevant from address
if
(
$from
===
'no-reply@example.org'
&&
$replyto
!==
null
)
{
$from
=
$replyto
;
}
// send the email
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment