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.
Post Reply
User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Site name in e-mail "from" field

Post by DavidIQ » Tue Oct 28, 2008 9:00 am

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'] . '>';

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest