Skip to content
Snippets Groups Projects
Commit 2809f2b8 authored by Olav Morken's avatar Olav Morken
Browse files

cron: Set the From-address to be the technical contact email address.

To avoid sending email with a From-address belonging to an external
domain, set it to the same as the technical contact address.

Thanks to Dick Visser for adding this!

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3021 44740490-163a-0410-bde0-09ae8108e29a
parent 2a97ea8f
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,8 @@ if ($cronconfig->getValue('sendemail', TRUE) && count($summary) > 0) {
if($toaddress == 'na@example.org') {
SimpleSAML_Logger::error('Cron - Could not send email. [technicalcontact_email] not set in config.');
} else {
$email = new SimpleSAML_XHTML_EMail($toaddress, 'simpleSAMLphp cron report', 'no-reply@simplesamlphp.com');
// Use $toaddress for both TO and FROM
$email = new SimpleSAML_XHTML_EMail($toaddress, 'SimpleSAMLphp cron report', $toaddress);
$email->setBody($message);
$email->send();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment