I am going to suggest you read the past replies I have sent to actually look at the comments I made and not just blindly copy and paste code. You have repeated the same mistakes.#!/usr/bin/perl -w # This turns on warnings use strict; # This pragma will help you avoid common mistakes by enforcing commonl +y accepted "good" coding techniques use CGI; # This will allow you to redirect your web page once you send the emai +l use CGI::Carp qw(fatalsToBrowser); # This will put any fatal errors to your web page instead of to the no +rmal error log use Mail::Mailer; # This will allow you to send the email my $query = CGI->new(); # This creates a new CGI object. The redirect method will come after +we have sent the mail. my %DATA = $query->Vars; # This uses a method on the CGI object to stick all the form values i +nto the DATA hash for you my $mailer = new Mail::Mailer ( "smtp" ); $mailer->open( { To => 'info@travancoresch.vic.edu.au', From => $DATA{Email}, Subject => 'Travancore School Professional Development' } ); # This will create a new object that we will use to send the email print $mailer "$DATA{Att1}\n"; print $mailer "$DATA{Att2}\n"; print $mailer "$DATA{Att3}\n"; # This will print to the email $mailer which is a file handle created +for you when you create the object. $mailer->close; # This sends the email print $query->redirect('http://www.travancoresch.vic.edu.au/developmen +t/reply02.html'); # This redirects the web page to the new desired location
If you do all that and it still doesn't work - come back and tell us what errors you got - we will be glad to help.
In reply to Re: How do I send mail from a script?
by Limbic~Region
in thread How do I send mail from a script?
by Nickd_69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |