[Resolved] Custom From Field In Mass Emails?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Keith W
Registered User
Posts: 1025
Joined: Mon Dec 13, 2004 6:14 pm

[Resolved] Custom From Field In Mass Emails?

Post by Keith W »

Is it possible to have a custom from field in mass emails?

Mass emails sent out currently have as the from address email@domain.com

I would like the from field to display my domain name instead of the email address
Last edited by ameeck on Tue May 26, 2009 8:24 am, edited 3 times in total.
Reason: Topic icon changed
Do not PM me unless I ask you to

Dance like no ones watching. Encrypt like everyone is.

Keith W
Registered User
Posts: 1025
Joined: Mon Dec 13, 2004 6:14 pm

Re: Custom From Field In Mass Emails?

Post by Keith W »

Anyone?

User avatar
Lumpy Burgertushie
Registered User
Posts: 67741
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Custom From Field In Mass Emails?

Post by Lumpy Burgertushie »

why not just edit the email file to show whatever you want?

robret
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

Keith W
Registered User
Posts: 1025
Joined: Mon Dec 13, 2004 6:14 pm

Re: Custom From Field In Mass Emails?

Post by Keith W »

Hi Robert,

What I am after changing is the from field as displayed in the end users email client, not what is actually displayed in the body content of the email itself.

So for example:

From: The Forum Domain To: end user

Instead of

From: forum@domain.com To: end user

Take care, Keith
Do not PM me unless I ask you to

Dance like no ones watching. Encrypt like everyone is.

Keith W
Registered User
Posts: 1025
Joined: Mon Dec 13, 2004 6:14 pm

Re: Custom From Field In Mass Emails?

Post by Keith W »

Bump
Do not PM me unless I ask you to

Dance like no ones watching. Encrypt like everyone is.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17223
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Custom From Field In Mass Emails?

Post by DavidIQ »

I actually have this done on my support forum. Let me get the code...
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17223
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: Custom From Field In Mass Emails?

Post by DavidIQ »

Ok found it...in 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'] . '>';
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

Keith W
Registered User
Posts: 1025
Joined: Mon Dec 13, 2004 6:14 pm

Re: Custom From Field In Mass Emails?

Post by Keith W »

Thanks David, that did the trick.

Many thanks
Do not PM me unless I ask you to

Dance like no ones watching. Encrypt like everyone is.

User avatar
DakotaSurfer
Registered User
Posts: 57
Joined: Thu Oct 25, 2007 6:55 pm
Location: USA

Re: [Resolved] Custom From Field In Mass Emails?

Post by DakotaSurfer »

You might want to change the profile_send_email.txt file as shown below.

Change from:

Code: Select all

Hello {TO_USERNAME},

The following is an e-mail sent to you by a Site Administrator via your account on "{SITENAME}".

Message as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~

{MESSAGE}

{EMAIL_SIG}
Change to:

Code: Select all

Hello {TO_USERNAME},

The following is an e-mail sent to you by {FROM_USERNAME} via your account on "{SITENAME}".

Message as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~

{MESSAGE}

{EMAIL_SIG}
DakotaSurfer
Official John Wayne Message Board
Site Admin

User avatar
adcantu
Registered User
Posts: 212
Joined: Wed Apr 21, 2004 12:08 am

Re: [Resolved] Custom From Field In Mass Emails?

Post by adcantu »

Ive had this working quite well on a few sites. Thanks for posting this.

I now have a new site I am running. The new site title has quotes in it however. These quotes mess up in the emails received. It says like the following

From: Famous "Quotes"

where it should be

From: Famous "Quotes"

Is there anything that could fix this? Thanks for any help.

User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: [Resolved] Custom From Field In Mass Emails?

Post by ric323 »

adcantu wrote:Ive had this working quite well on a few sites. Thanks for posting this.

I now have a new site I am running. The new site title has quotes in it however. These quotes mess up in the emails received. It says like the following

From: Famous "Quotes"

where it should be

From: Famous "Quotes"

Is there anything that could fix this? Thanks for any help.
It looks like you are trying to edit the template file with an HTML editor. Don't.
The files are plain text, just use a plain text editor.
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

User avatar
adcantu
Registered User
Posts: 212
Joined: Wed Apr 21, 2004 12:08 am

Re: [Resolved] Custom From Field In Mass Emails?

Post by adcantu »

Thanks for the reply. I am using a text editor, I am certain the code has uploaded correctly.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17223
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [Resolved] Custom From Field In Mass Emails?

Post by DavidIQ »

adcantu wrote:Thanks for the reply. I am using a text editor, I am certain the code has uploaded correctly.
Which text editor are you using?
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

User avatar
adcantu
Registered User
Posts: 212
Joined: Wed Apr 21, 2004 12:08 am

Re: [Resolved] Custom From Field In Mass Emails?

Post by adcantu »

I am using the text editor packaged with Cuteftp 8 Professional.

I dont believe it is my text editor as I have used it to edit thousands of lines of code, installing mods on over 14 phpbb3 bases sites.



as a test, I went ahead and added some more special characters to the site name, as follows.

: ' > ? / + } & % $

what was sent to the email was as follows:

: ' > ? / + } & % $


So perhaps some of the special characters simply arent parsed correctly?
Last edited by adcantu on Tue May 26, 2009 8:31 am, edited 1 time in total.

mk264
Registered User
Posts: 11
Joined: Mon Jan 22, 2007 3:24 am
Contact:

Re: [Resolved] Custom From Field In Mass Emails?

Post by mk264 »

Hi
Could you please tell me how I would add the name of my site into this file without pulling the site name. The site name I have added to the ACP is too long and I would like to add a shortened version to the from field.

Thanks in advance

Locked

Return to “[3.0.x] Support Forum”