always fallback to [shop].from email address
authorAdrian Oldham <adriann@visualthought.com.au>
Mon, 3 Mar 2014 12:49:07 +0000 (23:49 +1100)
committerAdrian Oldham <adriann@visualthought.com.au>
Fri, 14 Mar 2014 04:14:53 +0000 (15:14 +1100)
site/cgi-bin/modules/BSE/SubscriptionType.pm
site/cgi-bin/modules/BSE/UserReg.pm
site/cgi-bin/modules/SiteUser.pm

index d406bb29d2d11c399af3cc720f49c8f7416eaf09..e303475cde8d121a93cbf52311a8b5a20fe23465 100644 (file)
@@ -5,7 +5,7 @@ use Squirrel::Row;
 use vars qw/@ISA/;
 @ISA = qw/Squirrel::Row/;
 
-our $VERSION = "1.003";
+our $VERSION = "1.004";
 
 sub columns {
   return qw/id name title description frequency keyword archive 
@@ -331,7 +331,7 @@ sub _send {
   }
   my $from = $cfg->entryIfVar('subscriptions', 'from');
   unless ($from) {
-    $from = $Constants::SHOP_FROM;
+    $from = $cfg->entry('shop', 'from', $Constants::SHOP_FROM);
   }
   unless ($from) {
     $callback->('error', undef, "Configuration error: No from address configured, please set from in the subscriptions section of the config file, or \$SHOP_FROM in Constants.pm");
index cf3ca72a48fc6d64f62efff914dac9b9b82b98d2..c457a8725960a585f6a37527e7c55c494cd101d2 100644 (file)
@@ -18,7 +18,7 @@ use BSE::Util::Iterate;
 use base 'BSE::UI::UserCommon';
 use Carp qw(confess);
 
-our $VERSION = "1.030";
+our $VERSION = "1.031";
 
 use constant MAX_UNACKED_CONF_MSGS => 3;
 use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
@@ -2236,7 +2236,7 @@ sub send_conf_request {
   
   # check that the from address has been configured
   my $from = $cfg->entry('confirmations', 'from') || 
-    $cfg->entry('basic', 'emailfrom')|| $SHOP_FROM;
+    $cfg->entry('shop', 'from')|| $SHOP_FROM;
   unless ($from) {
     $acts{mailerror} = sub { escape_html("Configuration Error: The confirmations from address has not been configured") };
     return $req->dyn_response('user/email_conferror', \%acts);
index c05bb9467a55a106639439960f2bb44d2bf93811..d013a818a12b5f894648d7d41dbdb6835d660fa0 100644 (file)
@@ -18,7 +18,7 @@ SiteUser - represent a site user (or member)
 
 =cut
 
-our $VERSION = "1.012";
+our $VERSION = "1.013";
 
 use constant MAX_UNACKED_CONF_MSGS => 3;
 use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
@@ -252,7 +252,7 @@ sub send_conf_request {
 
   # check that the from address has been configured
   my $from = $cfg->entry('confirmations', 'from') || 
-    $cfg->entry('basic', 'emailfrom')|| $SHOP_FROM;
+    $cfg->entry('shop', 'from')|| $SHOP_FROM;
   unless ($from) {
     $$rcode = 'config';
     $$rmsg = "Configuration Error: The confirmations from address has not been configured";
@@ -926,7 +926,7 @@ sub lost_password {
      emailuser => [ \&BSE::Util::Tags::tag_hash_plain, $email_user ],
     );
   my $from = $cfg->entry('confirmations', 'from') || 
-    $cfg->entry('basic', 'emailfrom') || $SHOP_FROM;
+    $cfg->entry('shop', 'from') || $SHOP_FROM;
   my $nopassword = $cfg->entryBool('site users', 'nopassword', 0);
   my $subject = $cfg->entry('basic', 'lostpasswordsubject') 
     || ($nopassword ? "Your options" : "Your password");