Gossamer Forum
Home : Products : DBMan : Customization :

Forward Record Changes

Quote Reply
Forward Record Changes
JPDeni, this is a great mode but I would like to change the code slightly so you can send yourself the resource and not to a friend.

I removed the friends name email box and commented out the error check routines.

Could you give some detail on how to do this correctly as my changes may not be the correct way.


Quote Reply
Re: Forward Record Changes In reply to
The question is, does it work? There are many ways to accomplish the same task in Perl. My way may be different than yours, but yours could work just fine.

When you say "so you can send yourself the resource and not to a friend," do you mean the admin or a user?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Forward Record Changes In reply to
I mean sending to the user.

My modifications do work, but not knowing a great deal about perl(I am learning!) I wondered if there could be unknown problems to me occurring doing this way.

Assuming there would be little to change in the code doing it your way?

Quote Reply
Re: Forward Record Changes In reply to
Here's what I would do.

In sub forward_email, I would delete

unless ($in{'to_email'}) { $message = "You must fill in the recipient's email address<BR>"; }
unless ($in{'to_email'} =~ /.+\@.+\..+/) { $message = "The recipient's email address is not in the correct format.<BR>"; }


and change

print MAIL "To: $in{'to_email'}\n";

to

print MAIL "To: $in{'email'}\n";

And I would take out the "to_email" field in sub html_forward_email_form.

I don't see that there would be any problems with doing it. And it seems like that's what you did. Have a little faith in yourself!!! Smile

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Forward Record Changes In reply to
Nice neat code...

Just as i like it! Cool

- Best.