XFileSharing Pro - EMail notification on each Fileupload

Message
Author
kleinergeist191
Posts: 7
Joined: Jun 03, 2008 12:04 pm

EMail notification on each Fileupload

#1 Postby kleinergeist191 » Jun 03, 2008 12:05 pm

Is it possible to get an email for every fileupload?

I want to get informed when a file was uploaded,.... is it possible?

Thank you

Namaless
Posts: 107
Joined: Apr 20, 2008 12:10 pm

Re: EMail notification on each Fileupload

#2 Postby Namaless » Jun 04, 2008 6:52 am

kleinergeist191 wrote:Is it possible to get an email for every fileupload?

I want to get informed when a file was uploaded,.... is it possible?

Thank you
Yes is possible but all others files sharing service get this feature?

Regards.

kleinergeist191
Posts: 7
Joined: Jun 03, 2008 12:04 pm

#3 Postby kleinergeist191 » Jun 04, 2008 8:01 am

how can i do this?

Namaless
Posts: 107
Joined: Apr 20, 2008 12:10 pm

#4 Postby Namaless » Jun 04, 2008 9:17 am

kleinergeist191 wrote:how can i do this?
I'm not able to get XFS code. Wait the Developers of Sibsoft.

Regards.

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#5 Postby PilgrimX182 » Jun 05, 2008 5:37 am

No such feature by default. Cause it will spam owner if it's popular service.

But here goes quick hack for you: in index.cgi find

Code: Select all

$ses->PrintTemplate("upload_results.html",
and add this code above:

Code: Select all

my $tmpl = $ses->CreateTemplate("confirm_email_user.html");
$tmpl->param('files' => \@arr);
$ses->SendMail( $c->{contact_email}, $c->{email_from}, "$c->{site_name}: File send notification", $tmpl->output() );

kleinergeist191
Posts: 7
Joined: Jun 03, 2008 12:04 pm

#6 Postby kleinergeist191 » Jun 05, 2008 6:55 am

Now i ge an error after upload a file

Code: Select all

Software error:
HTML::Template->new() : Cannot open included file confirm_email_user.html : file not found. at Modules/HTML/Template.pm line 329
	HTML::Template::_init_template('HTML::Template=HASH(0x89a710)') called at Modules/HTML/Template.pm line 123
	HTML::Template::_init('HTML::Template=HASH(0x89a710)') called at Modules/HTML/Template.pm line 79
	HTML::Template::new('HTML::Template', 'filename', 'confirm_email_user.html', 'die_on_bad_params', 0, 'loop_context_vars', 1) called at Modules/Session.pm line 131
	Session::CreateTemplate('Session=HASH(0x73cf70)', 'confirm_email_user.html') called at index.cgi line 221
	main::UploadResult called at index.cgi line 47


User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#7 Postby PilgrimX182 » Jun 05, 2008 7:44 am

replace

Code: Select all

"confirm_email_user.html"
with

Code: Select all

"Templates/confirm_email_user.html"

kleinergeist191
Posts: 7
Joined: Jun 03, 2008 12:04 pm

Runs now

#8 Postby kleinergeist191 » Jun 05, 2008 7:30 pm

added now

Code: Select all

my $tmpl = $ses->CreateTemplate("Templates/confirm_email_user.html");
$tmpl->param('files' => \@arr);
$ses->SendMail( $c->{contact_email}, $c->{email_from}, "$c->{site_name}: File send notification", $tmpl->output() );
and it worked

kleinergeist191
Posts: 7
Joined: Jun 03, 2008 12:04 pm

#9 Postby kleinergeist191 » Aug 08, 2008 6:16 am

In Version 1.2 it don´t work anymore.

Code: Select all

HTML::Template->new() : Cannot open included file Templates/Templates/confirm_email_user.html : file not found. at Modules/HTML/Template.pm line 329
	HTML::Template::_init_template('HTML::Template=HASH(0x883210)') called at Modules/HTML/Template.pm line 123
	HTML::Template::_init('HTML::Template=HASH(0x883210)') called at Modules/HTML/Template.pm line 79
	HTML::Template::new('HTML::Template', 'filename', 'Templates/Templates/confirm_email_user.html', 'die_on_bad_params', 0, 'global_vars', 1, 'loop_context_vars', 1, ...) called at Modules/Session.pm line 122
	Session::CreateTemplate('Session=HASH(0x73cf70)', 'Templates/confirm_email_user.html') called at index.cgi line 300
	main::UploadResult called at index.cgi line 57

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#10 Postby PilgrimX182 » Aug 08, 2008 7:34 am

Enable your logic :)

replace

Code: Select all

my $tmpl = $ses->CreateTemplate("Templates/confirm_email_user.html");
with

Code: Select all

my $tmpl = $ses->CreateTemplate("confirm_email_user.html");