Changeset 198


Ignore:
Timestamp:
12/13/11 14:52:13 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Finish Vega-equivalent mail notifications (domain creation)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r197 r198  
    1717use Net::DNS;
    1818use Crypt::PasswdMD5;
    19 #use Net::SMTP;
     19use Net::SMTP;
    2020use NetAddr::IP;
    21 #use POSIX;
     21use POSIX;
    2222use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
    2323
     
    216216      # Mail settings
    217217      $config{mailhost}         = $1 if /^mailhost\s*=\s*([a-z0-9_.-]+)/i;
    218       $config{mailnotify}       = $1 if /^mailnotify\s*=\s*([a-z0-9_.@-]+)/i;
    219       $config{mailsender}       = $1 if /^mailsender\s*=\s*([a-z0-9_.@-]+)/i;
     218      $config{mailnotify}       = $1 if /^mailnotify\s*=\s*([a-z0-9_.\@-]+)/i;
     219      $config{mailsender}       = $1 if /^mailsender\s*=\s*([a-z0-9_.\@-]+)/i;
    220220      $config{mailname}         = $1 if /^mailname\s*=\s*([a-z0-9\s_.-]+)/i;
    221221      $config{orgname}          = $1 if /^orgname\s*=\s*([a-z0-9\s_.,'-]+)/i;
     
    20622062  $mailer->mail($mailsender);
    20632063  $mailer->to($config{mailnotify});
    2064   $mailer->data("From: \"$config{mailname}\" <$mailsender\n",
    2065         "To: $config{mailnotify}\n",
     2064  $mailer->data("From: \"$config{mailname}\" <$mailsender>\n",
     2065        "To: <$config{mailnotify}>\n",
    20662066        "Date: ".strftime("%a, %d %b %Y %H:%M:%S %z",localtime)."\n",
    20672067        "Subject: $subj\n",
  • trunk/dns.cgi

    r195 r198  
    347347
    348348  if ($code eq 'OK') {
    349 #    logaction($msg, $session->param("username"), $webvar{group}, "Added domain $webvar{domain}");
     349    mailNotify($dbh, "New ".($webvar{makeactive} eq 'on' ? 'Active' : 'Inactive')." Domain Created",
     350        ($webvar{makeactive} eq 'on' ? 'Active' : 'Inactive').qq( domain "$webvar{domain}" added by ).
     351        $session->param("username"));
    350352    changepage(page => "reclist", id => $msg);
    351353  } else {
Note: See TracChangeset for help on using the changeset viewer.