[Snippet] Site name in "From" address in emails

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
User avatar
doktornotor
BBCoder IV
BBCoder IV
Posts: 167
Joined: 14 Sep 2011, 23:20
BBCodes: 30
Favourite MOD: Thanks for Posts
Contact:

[Snippet] Site name in "From" address in emails

Post by doktornotor »

Credits: AmigoJack

Open: includes/functions_messenger.php

Find:

Code: Select all

		if (empty($this->replyto))
		{
			$this->replyto = '<' . $config['board_contact'] . '>';
		}

		if (empty($this->from))
		{
			$this->from = '<' . $config['board_contact'] . '>';
		}

		$encode_eol = ($config['smtp_delivery']) ? "\r\n" : $this->eol;
Replace with:

Code: Select all


		$encode_eol = ($config['smtp_delivery']) ? "\r\n" : $this->eol;

		if (empty($this->replyto))
		{
			$this->replyto = mail_encode($config['sitename'], $encode_eol) . ' <' . $config['board_contact'] . '>';
		}

		if (empty($this->from))
		{
			$this->from = mail_encode($config['sitename'], $encode_eol) . ' <' . $config['board_contact'] . '>';
		}
Support requests via PM go straight to /dev/null!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3540
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

[Snippet] Site name in "From" address in emails

Post by Stoker »

Installed here. Lets see if it working :)
Board rules! No PM support
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

[Snippet] Site name in "From" address in emails

Post by Blackwolf »

Works perfectly ;)
Email test.png
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
Locked