Changing mass email template.

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
BGodfrey
Registered User
Posts: 32
Joined: Fri Apr 10, 2009 11:37 pm

Changing mass email template.

Post by BGodfrey » Fri Jun 14, 2019 6:07 pm

The default mass email template looks like this:

Code: Select all

The following is an email sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:

{CONTACT_EMAIL}

Include this full email (particularly the headers). 

Message sent to you follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

{MESSAGE}

{EMAIL_SIG}
I tried to re-organize it to look like this:

Code: Select all

{MESSAGE}

{EMAIL_SIG}

This email was sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:

{CONTACT_EMAIL}

Include this full email (particularly the headers). 
But that produces an error when I send a test email.
I obviously have no idea how the fields in this template are used. Can someone enlighten me?
Thank you.

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

Re: Changing mass email template.

Post by Lumpy Burgertushie » Fri Jun 14, 2019 6:19 pm

exactly how did you edit the file and exactly which file did you edit?
what editor did you use to edit the file?

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

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

BGodfrey
Registered User
Posts: 32
Joined: Fri Apr 10, 2009 11:37 pm

Re: Changing mass email template.

Post by BGodfrey » Fri Jun 14, 2019 6:53 pm

Sorry. The file is language/en/email/admin_send_email.txt. I'm pretty sure that's the right one because mass emailing worked before I changed it and was broken after I changed it. :)

I'm not sure what you mean by "exactly how did I edit the file". I used UE Studio (Ultra Edit) in text mode and made the changes that you see in my first posting.

I could possibly expand on the error if it might help. It looks like this in the log:
Email error
» EMAIL/PHP/mail()
/forum/adm/index.php
I confess that the recorded error is also meaningless to me.

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

Re: Changing mass email template.

Post by Lumpy Burgertushie » Fri Jun 14, 2019 7:07 pm

I just did the exact same edits and it worked just fine.

use your backup copy of the email and try again.

use a good plain text editor. not any type of wysiwyg editor even in text mode because they will often add bits of code to the file that you can't see.

use notepad++ or editpad lite etc.
not notepad and not word etc.


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

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

BGodfrey
Registered User
Posts: 32
Joined: Fri Apr 10, 2009 11:37 pm

Re: Changing mass email template.

Post by BGodfrey » Fri Jun 14, 2019 7:40 pm

Ultra Edit Studio in text mode is a text editor just like notepad. No idea how that could mess anything up and I find it hard to believe that the creators of PHPBB used notepad to generate these files. A large part of the programming universe uses Ultra Edit/Studio.

At the beginning of this I sent a test message to the group and it worked fine.
I copied down the file then renamed the one on the server to preserve it.
I made the edit as you saw in my first post.
I uploaded the edited file and sent another test message. That one failed, generating the error message I showed you.
After some screwing around I reverted to the original file, untouched by me.
I sent another test message using the original file and got the same error.
I purged the cache and it still gives the same error.

Any idea what has gone wrong?

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

Re: Changing mass email template.

Post by Lumpy Burgertushie » Fri Jun 14, 2019 9:32 pm

please post here ( copy paste ) the exact message you are trying to send. there may be something in the message that is crashing php or that mod security is stopping.
and I have no idea for sure what the developers here use but I do know that the majority of them recommend notepad++ ( notice that is not notepad , they absolutely do NOT recommend notepad )



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

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

BGodfrey
Registered User
Posts: 32
Joined: Fri Apr 10, 2009 11:37 pm

Re: Changing mass email template.

Post by BGodfrey » Fri Jun 14, 2019 10:58 pm

I have created a TEMP directory and placed both the original (renamed, not edited at all) and the edited version of the file in it. Here are the links:
Original
Edited

Also some new information has appeared. If I try sending either of those versions I get the error. I've tried three or four times as I tried to figure this out. All of a sudden, all of the messages I sent using the original template came through at the same time. None of the edited ones. Then later I tried something else and sent a test message and they all came through again plus the new one. It's like they are somehow not getting marked as sent internally or something. And this burst seems to occur after quite a few minutes, not immediately. Other types of emails that have been sent out from the site come immediately. I don't know if this is useful information or just a red herring.

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

Re: Changing mass email template.

Post by Lumpy Burgertushie » Sat Jun 15, 2019 3:40 am

when you create a mass email there is a checkbox for send now.
otherwise I believe they are sent via a cron job when someone visits the site or something like that.

what is the contents of the email you are sending out? not the template, the content you are putting in the mass email form in the admin panel.

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

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

BGodfrey
Registered User
Posts: 32
Joined: Fri Apr 10, 2009 11:37 pm

Re: Changing mass email template.

Post by BGodfrey » Sat Jun 15, 2019 3:53 am

Lumpy Burgertushie wrote:
Sat Jun 15, 2019 3:40 am
when you create a mass email there is a checkbox for send now.
otherwise I believe they are sent via a cron job when someone visits the site or something like that.
"Send immediately" is checked by default and I leave it checked.
what is the contents of the email you are sending out? not the template, the content you are putting in the mass email form in the admin panel.
Just testing kind of messages. Subjects like "Test 1 mass email", etc. And contents like "ignore this" or "blah" or "delete this". (My wife is the only other one in the private group that I am testing with right now.)

Thanks for sticking with me on this. I know that it will end up being something silly or obvious - most problems are after you understand them. But I'm new to PHPBB and it's pretty complex.

User avatar
eeji
Jr. Style Validator
Posts: 1074
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Changing mass email template.

Post by eeji » Thu Jun 20, 2019 6:33 pm

Also make sure your text editor is saving your files encoded as utf8 without BOM. If it's adding a byte order mark it will cause you hassles.

BGodfrey
Registered User
Posts: 32
Joined: Fri Apr 10, 2009 11:37 pm

Re: Changing mass email template.

Post by BGodfrey » Fri Jun 21, 2019 12:04 am

OK, I just realized that there are two things going on here so I'll split them apart:
1. I opened the original file in Ultra Edit, checked to ensure that it was UTF-8 (it autodetects correctly) and saved it in a temporary directory prior to FTPing it to the website. I sent the email and got the message (below), but after a long wait (Send immediately is checked) it does get sent. I did the exact same thing with Notepad++ and as a control I also copied the original file into that same TEMP directory, uploaded it, and sent emails. All three of these methods resulted in the same "information" message:
Information
There were one or more errors while sending the email. Please check the Error log for detailed error messages.
« Back to previous page
So something is haywire with the message sending, but messages do go out so I'll ignore that.

2. Then I edited the file to this:

Code: Select all

{MESSAGE}

{EMAIL_SIG}

This email was sent to you by an administrator of "{SITENAME}". If this message is spam, contains abusive or other comments you find offensive please contact the webmaster of the board at the following address:

{CONTACT_EMAIL}

Include this full email (particularly the headers). 
I did it with Ultra Edit and with Notepad++. The Ultra Edit file produces this error message, even though it is in UTF-8 and no BOM:
Warning
The submitted form was invalid. Try submitting again.
The Notepad++ file produces the same "information" message and delay behavior as the unedited files.

Apparently one UTF-8 no BOM editor produces a usable text file and another UTF-8 no BOM editor does not. And regardless what you may choose to believe, Ultra Edit is very high-end and competent. So it appears I will have to use Notepad++ if I wish to edit this or any other text files. I would not expect this kind of eccentricity from modern software, but I'll leave it at that since I paid nothing for it.

In the mean time, I need to get back to creating the website and the emails do seem to go out, so I'll just live with these "information" messages.

Thanks very much for the help.

Post Reply

Return to “[3.2.x] Support Forum”