Page 1 of 1

Site name in e-mail "from" field

Posted: Tue Oct 28, 2008 9:00 am
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'] . '>';