Forum Moderators: coopster & phranque

Message Too Old, No Replies

Modifying FormMail email output

modify Perl output from FormMail

         

Tourex

6:22 pm on May 2, 2004 (gmt 0)

10+ Year Member



I've just installed NMS FormMail (v3.12c). It seems to be working OK, but the email notification sent out by the form ends with the line "Submit: submit" - obviously taking this from the Submit button at the bottom of the form. How can I prevent this showing on the email? It’s so unnecessary and unprofessional-looking.

Any help would be much appreciated. Its only a little thing, but its driving me nuts. Trouble is, I'm a total newbie to coding. I've checked the code and found the following section, which is what I assume need modifying:

[quoute]Outputs the form fields to the email body.
=cut

sub send_main_email_fields {
my ($self) = @_;

foreach my $f (@{ $self->{Field_Order} }) {
my $val = (defined $self->{Form}{$f}? $self->{Form}{$f} : '');

$self->send_main_email_field($f, $val);
}
}

=item send_main_email_field ( NAME, VALUE )
[/quote]

I would be truly grateful if somebody could tel me how to modify this to stop this silly output - or recommend a nice secure FormMail script that will do the job properly.

MichaelBluejay

8:52 am on May 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



See if this works. Change this line:

$self->send_main_email_field($f, $val);

to this:

if ($f!='Submit') { $self->send_main_email_field($f, $val); }

That tells it to send the field info only if the field is not called "Submit".

Let us know if this works for you.