Hi,
I'a want to know if there is a way to customize file send notification message and add sender name or even mail address. Actually Recipient get a simple message :
Somebody sent you these files using hostname :
Any help is welcome.
XFileSharing Pro - A way to add Sender name on file send notification
- PilgrimX182
- Posts: 2186
- Joined: Mar 22, 2006 1:39 pm
Yeah, no problem, below the code i have added in UploadResult function :
Add this after : my $usr_login = $ses->getUser->{usr_login} if .....
----------
my $FROMemail = $c->{email_from}; # create new variable with default sender address
if ($ses->getUser) # check if it's anonymous
{
$FROMemail = $ses->getUser->{usr_email}; # if not anonymous then get user email
}
Then replace :
$ses->SendMail( $f->{link_rcpt}, $c->{email_from},....
with :
$ses->SendMail( $f->{link_rcpt}, $FROMemail,....
I managed also to put Sender address in mail text message by adding FROMemail to the template variables :
$tmpl->param('FROMemail' => $FROMemail);
before calling SendMail.
Then you will be able to call FROMemail by adding <TMPL_VAR FROMemail> tag in "confirm_email_user.html".
PS : You can rename FROMemail variable to what you want.
Hope this could help.
Add this after : my $usr_login = $ses->getUser->{usr_login} if .....
----------
my $FROMemail = $c->{email_from}; # create new variable with default sender address
if ($ses->getUser) # check if it's anonymous
{
$FROMemail = $ses->getUser->{usr_email}; # if not anonymous then get user email
}
Then replace :
$ses->SendMail( $f->{link_rcpt}, $c->{email_from},....
with :
$ses->SendMail( $f->{link_rcpt}, $FROMemail,....
I managed also to put Sender address in mail text message by adding FROMemail to the template variables :
$tmpl->param('FROMemail' => $FROMemail);
before calling SendMail.
Then you will be able to call FROMemail by adding <TMPL_VAR FROMemail> tag in "confirm_email_user.html".
PS : You can rename FROMemail variable to what you want.
Hope this could help.
Hi hansolo,
Thanks for the quick response.
I understand what you have done here however, I am unable to find the first line (my $usr_login = $ses->getUser->{usr_login} if .....) within the index.cgi
I see the second part of your script to be amended within the index.cgi
Am I looking in the wrong area?
Thanks,
ozmo
Thanks for the quick response.
I understand what you have done here however, I am unable to find the first line (my $usr_login = $ses->getUser->{usr_login} if .....) within the index.cgi
I see the second part of your script to be amended within the index.cgi
Am I looking in the wrong area?
Thanks,
ozmo
Ok thanks again, but I am unable to find the following code within index.cgihansolo wrote:Yeah, the code have to be added to UploadResult fonction in index.cgi
Code: Select all
my $usr_login = $ses->getUser->{usr_login} if .....