+sub send_welcome_message
+{
+ my $row = shift() or return;
+ my $msg = new Mail::Send;
+ my $me = `id -un`; chomp($me);
+ my $host = `hostname`; chomp($host);
+ $host = $default_host unless ($host =~ m/[.]/ || !defined($default_host));
+ my $from_addr = $mail_from ?
+ "Exim BuildFarm <$mail_from>" :
+ "Exim BuildFarm <$me\@$host>" ;
+ $from_addr =~ tr /\r\n//d;
+ $msg->set('From',$from_addr);
+ $msg->to($row->{owner_email});
+ $msg->subject('Exim BuildFarm Application Approved');
+ my $fh = $msg->open;
+ print $fh "\n\nCongratulations $row->{sys_owner},\n",
+ "Your application for the Exim BuildFarm has been accepted.\n\n",
+ "Please set the following in your build-farm.conf:\n",
+ "Animal: $row->{name}\n",
+ "Secret: $row->{secret}\n\n",
+ "BuildFarm machine details:\n",
+ "Distro : $row->{operating_system}\n",
+ "+Version: $row->{os_version}\n",
+ "Arch : $row->{architecture}\n",
+ "Compiler: $row->{compiler}\n",
+ "+Version: $row->{compiler_version}\n\n",
+ "If you update your system, either the Distro or compiler version\n",
+ "you can use the update_personality.pl script to update the\n",
+ "version stored in the BuildFarm database.\n\n",
+ "-- The Exim BuildFarm Maintainers";
+ $fh->close;
+}
+