| View previous topic :: View next topic |
| Author |
Message |
kleinergeist191
Joined: 03 Jun 2008 Posts: 7
|
Posted: Jun 03, 2008 12:05 pm Post subject: EMail notification on each Fileupload |
|
|
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 |
|
| Back to top |
|
 |
Namaless
Joined: 20 Apr 2008 Posts: 107 Location: Italy
|
Posted: Jun 04, 2008 6:52 am Post subject: Re: EMail notification on each Fileupload |
|
|
| 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. |
|
| Back to top |
|
 |
kleinergeist191
Joined: 03 Jun 2008 Posts: 7
|
Posted: Jun 04, 2008 8:01 am Post subject: |
|
|
| how can i do this? |
|
| Back to top |
|
 |
Namaless
Joined: 20 Apr 2008 Posts: 107 Location: Italy
|
Posted: Jun 04, 2008 9:17 am Post subject: |
|
|
| kleinergeist191 wrote: | | how can i do this? |
I'm not able to get XFS code. Wait the Developers of Sibsoft.
Regards. |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Jun 05, 2008 5:37 am Post subject: |
|
|
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: | | $ses->PrintTemplate("upload_results.html", |
and add this code above:
| Code: | 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() ); |
|
|
| Back to top |
|
 |
kleinergeist191
Joined: 03 Jun 2008 Posts: 7
|
Posted: Jun 05, 2008 6:55 am Post subject: |
|
|
Now i ge an error after upload a file
| Code: | 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
|
|
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Jun 05, 2008 7:44 am Post subject: |
|
|
replace
| Code: | | "confirm_email_user.html" |
with
| Code: | | "Templates/confirm_email_user.html" |
|
|
| Back to top |
|
 |
kleinergeist191
Joined: 03 Jun 2008 Posts: 7
|
Posted: Jun 05, 2008 7:30 pm Post subject: Runs now |
|
|
added now
| Code: | 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 |
|
| Back to top |
|
 |
kleinergeist191
Joined: 03 Jun 2008 Posts: 7
|
Posted: Aug 08, 2008 6:16 am Post subject: |
|
|
In Version 1.2 it donīt work anymore.
| Code: | 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
|
|
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 1107 Location: Undisclosed location
|
Posted: Aug 08, 2008 7:34 am Post subject: |
|
|
Enable your logic
replace
| Code: | | my $tmpl = $ses->CreateTemplate("Templates/confirm_email_user.html"); |
with
| Code: | | my $tmpl = $ses->CreateTemplate("confirm_email_user.html"); |
|
|
| Back to top |
|
 |
|