Rusnak PHP Scripts Support Forums

Full Version: How to specify the "from" e-mail address.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I didn't like how the script would send out the activation e-mail with my server's hostname instead of an actual e-mail address so this is what I did to fix it:

Find in mkforum.php:
Code:
//This is the mail message that is sent out.
$message = "Hello,\n\nYour forums are all ready to go!  You just need to activate them.\n\nHere are your details:\n\nForum URL: ".$myURL."\nAdmin Password: ".$pass1."\nActivation Code: ".$act."\n\nYou can activate your forums at ".$myURL."/activate.php to ensure they are not deleted.\n\nHave a great day,\nThe ".$dname." team.";

Add below:
Code:
$headers = "From: <INSERT EMAIL ADDRESS>";
(Example: $headers = "From: my@email.com";)

Find next:
Code:
//Send the mail
mail($email, "Activation Code for your free forums", $message);

Replace with:
Code:
//Send the mail
mail($email, "Activation Code for your free forums", $message, $headers);

And you're done! Big Grin
Thanks for this. Smile
Thanks for this Smile
thanks for the info
cool, thanks for sharing!
Thanks bro!
hey can we add this modification to the emails that we can send from the Host CP?i mean to the Forum owners?
Please let me know where to make the changes.

Thanks
Modified it successfully!
Just make the similar changes in email.php in adm folder.
Thank you!
I am sure this must have been useful to many users out there who were anxious to find a way to specify the “from” e-mail address!! After all, we all would like to see from whom our e-mail has come from, instead of the usual server's hostname!! This code is really useful and help us identify the sender's name and address the minute we get the e-mail instead of seeing the host server's name in the “from” space!!
Pages: 1 2
Reference URL's