hankcoder has asked for the wisdom of the Perl Monks concerning the following question:
Hi Guru,
I am wondering is there any illegal characters that I need to worried about or do something when I'm using sendmail to delivery an email?
In particular when/IF there is any illegal characters inside variable like $to_email, $from_email, $subject.
my $mailprogram = "/usr/sbin/sendmail -oi -t"; open (MAIL, "|$mailprogram") || ($errmsg = "Error $!"); print MAIL "To: $to_email\n"; print MAIL "From: $from_email\n"; print MAIL "Subject: $subject\n";
The $from_email may contain value like "Someone Name <$form_email>". The name is obtain from Form, therefore should I do any filter?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sendmail - worried illegal chars
by atcroft (Abbot) on Apr 05, 2016 at 21:02 UTC | |
|
Re: sendmail - worried illegal chars
by haukex (Archbishop) on Apr 05, 2016 at 21:39 UTC | |
|
Re: sendmail - worried illegal chars
by stevieb (Canon) on Apr 05, 2016 at 21:09 UTC | |
by atcroft (Abbot) on Apr 05, 2016 at 21:13 UTC | |
by choroba (Cardinal) on Apr 05, 2016 at 21:57 UTC | |
by stevieb (Canon) on Apr 05, 2016 at 22:33 UTC | |
|
Re: sendmail - worried illegal chars
by hankcoder (Scribe) on Apr 07, 2016 at 13:54 UTC |