in reply to Re^2: sendmail working for me but not another
in thread sendmail working for me but not another
So you are saying it should look like this?
Yes, what you showed is correct. Note it's generally better to use heredocs instead of a multiline qq, so e.g.
my $email_message = <<"ENDMAIL"; To: $recipient Subject: Adoption Application ... ENDMAIL
My host is telling me i'm not allowed to look at the email logs, I've asked them what I can access and i'm waiting to hear.
You could write out your data to a logfile on your account, in case something with the emails doesn't work out.
I know the code is horrible but i'm learning.
If this were a legacy script, ok, but if this a new script, then you'd be much better off learning something more modern. I've been doing a lot with Mojolicious recently, and I think it's pretty great. See Mojolicious::Guides::Tutorial for getting started. Otherwise, at the very least what this script needs is to Use strict and warnings! See also UP-TO-DATE Comparison of CGI Alternatives.
And with that many variables, it'd be much better to store them in a data structure like a hash. Then you could do things like loop over it so you don't have to repeat the regex a bunch of times. (Also, note you don't seem to be doing anything with the yardtypeother field.)
Also, you should check if the host has Email::Sender::Simple installed, that should be much better and easier to use than shelling out to sendmail.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: sendmail working for me but not another
by kickingchicken (Initiate) on May 26, 2020 at 03:52 UTC | |
by haukex (Archbishop) on May 26, 2020 at 07:24 UTC |