Page 1 of 1

Mail() sender's address?

PostPosted: Fri Nov 04, 2011 11:48 pm
by test
Where, or how can I set the e-mails sent from DFH to the users (like when they fill in their e-mail and hit the upload file)?
I want to make it that when the user fill in his e-mail, and the script sends him his upload details (download link & delete link), on the mail he'll get, the sender address will be address I've set, let's say mailer@myfilehost.com, for example, so the user will know that it's from my site without even opening it first.

Hope you understand me.

Thanks! :)

Re: Mail() sender's address?

PostPosted: Mon Nov 07, 2011 2:37 pm
by SamEA
This line
Code: Select all
headers = 'From: noreply@' .$emailsender . "\r\n" .
found in ./pages/register.php and ./pages/login.php

But the user should already know it's coming from your site, because $emailsender holds your domain address.

Re: Mail() sender's address?

PostPosted: Mon Nov 07, 2011 4:10 pm
by test
Well, this is good news to me, since my DFH installation is sending the mail through a shared server, so the address is not like my domain. I think you should set a global "Sender E-mail address", to allow more customization on mails getting sent from the DFH installation.

The file you mentioned will help me at the moment until, and if the feature I've suggested will be implemented.

But, there's one more place I need to alter my DFH installation sender address... It's in ./upload.php, in the variable:
$uploadmsg

How can I alter the headers of the mail being sent within the $uploadmsg variable? Thanks for your help.

Re: Mail() sender's address?

PostPosted: Tue Nov 08, 2011 3:09 am
by SamEA
I never tested DFH through a shared server and that is why such an idea was never thought of. I will take that feature into consideration for future versions.

Find
Code: Select all
mail($_POST['myemail'],"Your Uploaded File",$uploadmsg,"From: ". $email ."\n");
in ./upload.php and change to
Code: Select all
mail($_POST['myemail'],"Your Uploaded File",$uploadmsg,"From: donotreply@yourdomain.com\n");


Realize I removed the $email variable and replaced it with donotreply@yourdomain.com

Re: Mail() sender's address?

PostPosted: Tue Nov 08, 2011 10:01 am
by test
Great! Just what I've needed! And also this will be a good feature, atleast for people like me.

Thanks alot! Keep up the good work! :)

Re: Mail() sender's address?

PostPosted: Tue Nov 08, 2011 11:02 am
by SamEA
Glad you're enjoying DFH :).