Site name in e-mail "from" field

Any and all modifications I have created for phpBB3 will be listed here and support will be provided.
Locked
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Site name in e-mail "from" field

Post by DavidIQ »

Some people would like to have their site name in the e-mail from field for emails sent from their forum, just like it is here. This is easily achieved through the following code changes:

Open includes/functions_messenger.php

Find:

Code: Select all

		$headers[] = 'From: ' . $this->from;
Replace with:

Code: Select all

		$headers[] = 'From: "' . str_replace("&", "&", $config['sitename']) .'" ' . $this->from;
Find:

Code: Select all

		$headers[] = 'Sender: <' . $config['board_email'] . '>';
Replace with:

Code: Select all

		$headers[] = 'Sender: "' . str_replace("&", "&", $config['sitename']) .'" <' . $config['board_email'] . '>';
Locked