--- loncom/enrollment/Autoenroll.pl 2005/11/07 15:43:22 1.15 +++ loncom/enrollment/Autoenroll.pl 2006/05/18 01:09:14 1.20 @@ -1,7 +1,7 @@ #!/usr/bin/perl # #Automated Enrollment script -# $Id: Autoenroll.pl,v 1.15 2005/11/07 15:43:22 raeburn Exp $ +# $Id: Autoenroll.pl,v 1.20 2006/05/18 01:09:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,7 @@ use Apache::lonnet; use Apache::loncoursedata; use Apache::lonmsg; + use Apache::longroup; use HTML::Entities; # Determine the library server's domain and hostID @@ -153,7 +154,12 @@ $to_notify[0] = $enrollvar{$crs}{notifylist}; } foreach my $cc (@to_notify) { - my ($ccname,$ccdom) = split/@/,$cc; + my ($ccname,$ccdom); + if ($cc =~ /:/) { + ($ccname,$ccdom) = split(/:/,$cc); + } elsif ($cc =~ /\@/) { + ($ccname,$ccdom) = split(/\@/,$cc); + } my $status = &Apache::lonmsg::user_normal_msg($ccname,$ccdom,$subject,$message); } if ( ($enrollvar{$crs}{notifylist} eq '') && ($newusermsg ne '') ) {