Looking at this myself, and added the email kludge to the xxx.biz.cgi file
to handle it.
Added message.txt and thankyou.txt, appropriatly modified to the template
dir, and added the kludge just above where the cgi prints out the
thankyou.html.
Hard coded the reg_type and added the send_email subroutine. Took about 10
minutes.
The email kludge added at line 454 and includes the thankyou.html bit from
the original xxxbiz.cgi so you know here it goes,
# Line 454
# email kludge ###############
############################################################
# sample routine to send message to admin with billing info
my $domain = $in{domain};
my $id = $in{id};
my $reg_type = "New BIZ Domain";
if ($REG_SYSTEM{F_SEND_ORDERS}) {
# sample routine to send message to customer
# THINK: Email & RACE...
send_email("$path_templates/message.txt",
{
%in,
domain => $domain,
mailfrom => $in{owner_email},
mailto => $ADMIN_EMAIL,
id => $id,
period_text => $REG_PERIODS{$in{period}},
reg_type => $reg_type,
});
}
# sample routine to send message to customer
# THINK: Email & RACE...
if ($REG_SYSTEM{F_SEND_THANKYOU}) {
send_email("$path_templates/thankyou.txt",
{
%in,
domain => $domain,
mailto => $in{owner_email},
mailfrom => $ADMIN_EMAIL,
id => $id,
});
}
################################################################
my $id = $register_results->{attributes}->{id};
my $x = sprintf ("%s processed with order \# %d.\n", $data->{domain},
$id);
my %HTML;
$HTML{status} = $x."<br>".$register_results->{response_text};
$HTML{partner_email} = $ADMIN_EMAIL;
$HTML{CGI} = $cgi;
$HTML{affiliate_id} = $in{affiliate_id};
print_form(template=>"$path_templates/thankyou.html",data=>\%HTML);
}
......................
Then right below it, simply add the standard send_email subroutine. taken
straight from reg_system.cgi
Now - I can't promis that it works - no horizon test bed don't you know!!!!
But it looks like it should :-)
....................................
# generic method to send an email based on a template and a hash ref of
values
sub send_email {
my ($template,$href) = @_;
open (FILE, "<$template") or die "Couldn't open $template: $!\n";
$/ = undef;
my $message = <FILE>;
$/ = "\n";
close FILE;
$message =~ s/{{(.*?)}}/$href->{$1}/g;
my $mailto = $href->{mailto};
my $mailfrom = $href->{mailfrom};
if ($MAIL_TYPE eq 'sendmail') {
open (MAIL, "|$MAILPROG") or die "Can't open $MAILPROG: $!\n";
print MAIL $message;
close MAIL or return undef;
} else {
send_smtp_mail($mailto,$mailfrom,$message) or return undef;
}
return 1;
}
Cheers
Robert
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Charles Daminato
> Sent: Monday, 23 July 2001 11:10 PM
> To: Philip Clever; [EMAIL PROTECTED]
> Subject: RE: email conf missing in 2.4.1?
>
>
> Philip,
>
> Apologies. Due to the stringent timelines we had to work towards minimal
> features to get things working as quickly and smoothly as possible. The
> current reg_system.biz/info scripts are only temporary devices - once the
> pre-reg/landrush phases are completed, these bits wont be used anymore. I
> will work with the product manager on biz/info to ensure email
> templates are
> included for the real-time registration version of the scripts :)
>
>
> Charles Daminato
> OpenSRS Product Manager
> Tucows Inc. - [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Philip Clever
> > Sent: July 19, 2001 5:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: email conf missing in 2.4.1?
> >
> >
> > Just installed 2.4.1, and looks like the .biz & .info reg_system
> > cgi's don't
> > have a template mesage.txt. How are the end user and reseller
> > supppose to
> > get confirmations of orders placed via the web?
> >
> > -Philip
> >
> >
>
>