On 2012-05-15 4:46 PM, David Goodwin <da...@co...> wrote:
> I suspect you'd actually want to make it become :
>
> my $from = "$name<$email>";
>
> But I don't know for certain.
I'm happy to test it, but...
I checked and there is no $name variable defined in the script... so,
any idea/suggestion for how to properly set it?
It looks like the best way would be to simply add a query that sets
$name variable in the send_vacation_email subroutine - and it looks like
the query that sets the $subject and $body variables is at line 418:
my $query = qq{SELECT subject,body FROM vacation WHERE email=?};
So, I'm thinking a query before (or after, probably doesn't matter?) the
one above that sets the $name variable - but I'm not sure of the proper
way to do this - ie, do I use the 'my $query =' prefix, like:
my $query = qq{SELECT name FROM mailbox WHERE email=?};
or just do
qq{SELECT name FROM mailbox WHERE email=?};
Then I'd just change line 432 (the 'my $from =' line below) to:
my $from = "$name $email";
Another thing is, the name should be in double quotes, and the email
should be in <> brackets, so how to properly accomplish that?
Should the above be:
my $from = "$name $email";
or
my $from = "$name" <$email>;
Or, maybe add two additional lines adding the quotes to the name and the
brackets to the email, like:
my $name = "$name";
my $email = <$email>;
Then just do
my $from = $name $email;
Or maybe, as in your example:
my $from = "$name $email";
to separate the two variables with a space?
Thanks for any more insights into how I might accomplish this...
Also - David, it appears that you aren't very familiar with the
vacation.pl script... is there someone else that you know of that I can
ask about this that is more familiar with it?
Thanks again,
Charles
|