I need to put some additional information in the email that gets sent when you "approve and send email" to a new registrant.
Does anyone know where it's located?
seem to be in emailtemplates.english.
That's the one
All the email templates are in there.
So they appear to be canned arrays that are called from elsewhere.
I just need to put a few line breaks in there. Not knowing how it's getting processed, can I drop a few <p> in there to get some new lines started? The sentence change made the paragraph just a tad long, and it looks "runny" when viewed on a phone.
I'd make a fake account and test the view, but I can't register from the same laptop, and I'm out on the road with only 1 machine.
In some of my own projects that email members, I set up the headers
$headers = "From: " . $from . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
I'm guessing SMF uses the same mail engine as my server, but I'm not sure where to check the headers.
Look how the existing templates put in line breaks and do the same, I.e. NOT just jamming in p tags.
Quote from: Arantor on August 28, 2024, 01:21:21 PMLook how the existing templates put in line breaks and do the same, I.e. NOT just jamming in p tags.
Does a particular template come to mind to inspect?
I'm looking at admin.template and I see <br> and such--even some <p></p> enclosures.
Before I choose the markups to do line breaks, are the automatic emails sent out for registration done in plain text or html? I've tried <br> <p> \n and such an the automatic emails received on a test account just print those tags. So, no effect.
I know using mail() right out of a php page requires me to set the headers properly, but the templates look like the use both--like when you're sending messages inside of SM's news and can choose to use html or not. But the automated registration message--I can't tell which they are.
Quote from: rcane on August 28, 2024, 01:29:40 PMQuote from: Arantor on August 28, 2024, 01:21:21 PMLook how the existing templates put in line breaks and do the same, I.e. NOT just jamming in p tags.
Does a particular template come to mind to inspect?
I'm looking at admin.template and I see <br> and such--even some <p></p> enclosures.
Um, the email one since that's the one you're going to change?
Yeah, no kidding. But, I do not see anything that looks like line breaks in the template.
But, all the the 'body'=> from the $txt['emails] array looks like it is just a long run-on of text--explaining whatever it needed to at that moment.
It's just unclear. SMF is set to php(default) in mail settings.
Using php mail() I set the headers myself. But, i've tried both plainText and html in emailTemplates.english to see if either would work.
I'm not having success seeing where $txt[emails] is being called.
You're not going to find where that $txt is looked up because it's so indirect.
Which is why I told you to look at the template itself - because some can be sent in HTML mode, some in text mode and the most reliable way is to look at the template itself!
The text is not all one line in there! Most of them are sent in text mode.
(There is a reason the email templates are all together in one place.)
OK, I 'see' it now. That's not what I expected.