svn: /web/doc-editor/trunk/ php/AccountManager.php scripts/cron/check_build.php scripts/cron/send_work_to_list.php
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Wed, 29 Dec 2010 20:11:14 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306834
Log:
Change From header when sending email to the list
Changed paths:
U web/doc-editor/trunk/php/AccountManager.php
U web/doc-editor/trunk/scripts/cron/check_build.php
U web/doc-editor/trunk/scripts/cron/send_work_to_list.php
Modified: web/doc-editor/trunk/php/AccountManager.php
===================================================================
--- web/doc-editor/trunk/php/AccountManager.php 2010-12-29 19:54:41 UTC (rev 306833)
+++ web/doc-editor/trunk/php/AccountManager.php 2010-12-29 20:11:14 UTC (rev 306834)
@@ -522,12 +522,15 @@
* @param $subject The subject of the email.
* @param $msg The content of the email. Don't use HTML here ; only plain text.
* @param $from The email we place into From header.
+ * @param $fromType Either "user" or "list". Default to user
*/
- public function email($to, $subject, $msg, $from='')
+ public function email($to, $subject, $msg, $from='', $fromType='user')
{
- if( $from != 'www' ) $from = $this->vcsLogin;
+ if( $fromType == 'user' ) {
+ $from = $this->vcsLogin."@php.net";
+ }
- $headers = 'From: '.$from.'@php.net' . "\r\n" .
+ $headers = 'From: '.$from . "\r\n" .
'X-Mailer: Php Docbook Online Editor' ."\r\n" .
'Content-Type: text/plain; charset="utf-8"'."\n";
Modified: web/doc-editor/trunk/scripts/cron/check_build.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/check_build.php 2010-12-29 19:54:41 UTC (rev 306833)
+++ web/doc-editor/trunk/scripts/cron/check_build.php 2010-12-29 20:11:14 UTC (rev 306834)
@@ -75,7 +75,7 @@
$subject = "[DOC-".strtoupper($emailLang)."] - Your documentation is broken";
// We send an email for this failed build
- AccountManager::getInstance()->email($to, $subject, $msg, 'www');
+ AccountManager::getInstance()->email($to, $subject, $msg, $to, 'list');
echo "email send !\n";
// We store it into DB
Modified: web/doc-editor/trunk/scripts/cron/send_work_to_list.php
===================================================================
--- web/doc-editor/trunk/scripts/cron/send_work_to_list.php 2010-12-29 19:54:41 UTC (rev 306833)
+++ web/doc-editor/trunk/scripts/cron/send_work_to_list.php 2010-12-29 20:11:14 UTC (rev 306834)
@@ -94,7 +94,7 @@
$subject = "Contributions are ready for review";
// We send an email for this failed build
- AccountManager::getInstance()->email($to, $subject, $msg, 'www');
+ AccountManager::getInstance()->email($to, $subject, $msg, $to, 'list');
echo "email send !\n";