in reply to Re: How do I send mail from a script?
in thread How do I send mail from a script?

Look I'm sorry for getting you so pissed off but I am only learning. I have gone through your code and I had already read all your comments and nearly all available info off this site. I now have the following script but the error I get in my error log is something like that CGI is not declared on line 8 and the script was aborted due to compilation errors. Could you just have a quick look? I know how frustrating newbies are but im slowly getting it!!
#!/usr/bin/perl -w use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use Mail::Mailer; my $query = CGI->new(); my %DATA = $query->Vars; my $mailer = new Mail::Mailer ( "smtp" ); $mailer->open( { To => 'info@travancoresch.vic.edu.au', From => $DATA{Email}, Subject => 'Travancore School Professional Development' } ); print $mailer "$DATA{Title}\n"; print $mailer "$DATA{Name}\n"; print $mailer "$DATA{Position}\n"; print $mailer "$DATA{School}\n"; print $mailer "$DATA{Address}\n"; print $mailer "$DATA{Suburb}\n"; print $mailer "$DATA{State}\n"; print $mailer "$DATA{PCode}\n"; print $mailer "$DATA{Email}\n"; print $mailer "$DATA{Tel}\n"; print $mailer "$DATA{Fax}\n"; print $mailer "$DATA{Att1}\n"; print $mailer "$DATA{Att2}\n"; print $mailer "$DATA{Att3}\n"; $mailer->close; print $query->redirect('http://www.travancoresch.vic.edu.au/developmen +t/reply02.html');