focus310 has asked for the wisdom of the Perl Monks concerning the following question:
sub send_main_email_body_header { my ($self, $date) = @_; my $dashes = '-' x 75; $dashes .= "\n\n" if $self->{CFG}{double_spacing}; $self->mailer->print(<<END); This is the information which was submitted. END } sub send_main_email_print_config { my ($self) = @_; if ($self->{FormConfig}{print_config}) { foreach my $cfg (@{ $self->{FormConfig}{print_config} }) { if ($self->{FormConfig}{$cfg}) { $self->mailer->print("$cfg: $self->{FormConfig}{$cfg}\n"); $self->mailer->print("\n") if $self->{CFG}{double_spacing}; } } } } 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); } } sub send_main_email_field { my ($self, $name, $value) = @_; my ($prefix, $line) = $self->build_main_email_field($name, $value); my $nl = ($self->{CFG}{double_spacing} ? "\n\n" : "\n"); if ($self->{CFG}{wrap_text} and length("$prefix$line") > $self->emai +l_wrap_columns) { $self->mailer->print( $self->wrap_field_for_email($prefix, $line) +. $nl ); } else { $self->mailer->print("$prefix$line$nl"); } } sub build_main_email_field { my ($self, $name, $value) = @_; return ("$name: ", $value); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Formatting Help
by Melly (Chaplain) on Mar 22, 2006 at 11:48 UTC | |
|
Re: Formatting Help
by timos (Beadle) on Mar 22, 2006 at 11:49 UTC |