summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-10-09 08:06:12 +0000
committerPaul 'flowerysong' Arthur <flowerysong00@yahoo.com>2010-10-09 08:06:12 +0000
commitf82f5454f9832303ef5075b73e5017549c3a19ae (patch)
tree71805afd7285d8d1829ec593ca787140eaea7c4e /modules
parentb18ff601386b5f59c264b554e7ded04890c4283e (diff)
downloadampache-f82f5454f9832303ef5075b73e5017549c3a19ae.tar.gz
ampache-f82f5454f9832303ef5075b73e5017549c3a19ae.tar.bz2
ampache-f82f5454f9832303ef5075b73e5017549c3a19ae.zip
Refactor mail handling a bit and make registration use the same method as the
other places that send mail.
Diffstat (limited to 'modules')
-rw-r--r--modules/validatemail/validateEmail.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/modules/validatemail/validateEmail.php b/modules/validatemail/validateEmail.php
index 78bbf5f6..14121078 100644
--- a/modules/validatemail/validateEmail.php
+++ b/modules/validatemail/validateEmail.php
@@ -149,25 +149,19 @@ function validateEmail ( $email, $verbose=0 ) {
// Leave blank to use $SERVER_NAME.
// Note that most modern MTAs will ignore (but require) whatever you say here ...
// the server will determine your domain via other means.
- if (Config::get('mail_check')) {
- $mail_check = Config::get('mail_check');
- } else {
- $mail_check = "strict";
- }
+ $mail_check = Config::get('mail_check');
+ $mail_check = $mail_check ? $mail_check : 'strict';
+ if ($mail_check == 'strict' && strncmp(PHP_OS, 'WIN', 3) === true) {
+ $mail_check = "easy";
+ }
- if ($mail_check == 'strict' && strncmp(PHP_OS,'WIN',3) === TRUE) {
- $mail_check = "easy";
- }
+ $serverName = Config::get('mail_domain');
+ $serverName = $serverNam ? $serverName : 'example.com';
- if (Config::get('mail_domain')) {
- $serverName = Config::get('mail_domain');
- }
- else {
- $serverName = "domain.tld";
- }
// MAIL FROM -- who's asking?
// Good values: nobody, postmaster, info, buckwheat, gumby
- $from = "info";
+ $from = Config::get('mail_user');
+ $from = $from ? $from : 'info';
// fsockopen() timeout - in seconds
$socketTimeout = 15;