XUpload - Variable in Subject of email

Message
Author
azvisual
Posts: 34
Joined: May 23, 2007 9:05 pm

Variable in Subject of email

#1 Postby azvisual » Jun 04, 2007 11:55 pm

Any way I can have one of my variables (ucompany) in the Admin email subject? So instead of "New File Submission" it would read "New File Submission from Some Company Name"?

Since the email subject is done in the upload.cgi, I figure this may be do-able?

Thanks once again. (I don't mean to be a pest, but I really need these things or I wouldn't bother you with them)

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

#2 Postby PilgrimX182 » Jun 05, 2007 5:57 am

It's quick easy hack: in upload.cgi find line

Code: Select all

my $subject = $c->{email_subject} || "XUpload: New file(s) uploaded";


and replace it with

Code: Select all

my $subject = $c->{email_subject} || "New File Submission from ".$cg->param('company_name');


where 'company_name' is input from your upload_form.html, you can use any other name.

azvisual
Posts: 34
Joined: May 23, 2007 9:05 pm

#3 Postby azvisual » Jun 05, 2007 2:26 pm

Once I commented out email_subject in the XUploadConfig.pm it worked great, thanks!

Now, if possible, I'd like the senders email in the admin confirmation from field, so I can reply to the confirmation email and it is addressed to the sender of the form.

This should be my last issue, and I truly applaud your support. It's a step (or 2) above most.
Last edited by azvisual on Mar 29, 2008 2:00 am, edited 1 time in total.

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

#4 Postby PilgrimX182 » Jun 06, 2007 8:44 am

Thanks!

Replace line

Code: Select all

&SendMail( $c->{confirm_email}, $c->{confirm_email_from}, $subject, $tmpl->output() );


with

Code: Select all

&SendMail( $c->{confirm_email}, $cg->param('email_notification'), $subject, $tmpl->output() );


But I should notice that emails with user's address sent from your server could be detected as Spam email, cause some ISPs verify domain names and IPs.

azvisual
Posts: 34
Joined: May 23, 2007 9:05 pm

#5 Postby azvisual » Jun 06, 2007 4:03 pm

Perfect, thanks!


Return to “XUpload”



Who is online

Users browsing this forum: No registered users and 0 guests