News:

Wondering if this will always be free?  See why free is better.

Main Menu

Improved Webmaster Email Settings

Started by Deprecated, October 26, 2008, 04:09:32 AM

Previous topic - Next topic

Deprecated

Link to Mod

Obsolete

Costa

Congrats for the mod dude!
Very interesting  ;)

Here is the translation to brazilian

./Themes/default/languages/Modifications.portuguese_brazilian.php
$txt['mailfrom'] = 'Enviar endereço de correio eletrônico';
$txt['mods_cat_mailfrom'] = 'Enviar endereço de correio eletrônico';
$txt['mail_from'] = 'Enviar endereço de correio eletrônico para enviar:';

./Themes/default/languages/portuguese_brazilian.php

$helptxt['webmaster_email'] = '<b>Endereço de correio eletrônico do Webmaster</b><br /><br />
Este endereço de correio eletrônico é usado como destinatário para notificações importantes como falhas na conexão da base de dados e erros na base de dadosT.';
$helptxt['mail_from'] = '<b>Enviar correio eletrônico do endereço</b><br /><br />
Esta configuração é o endereço de correio eletrônico de onde são enviadas todas as mensagens do seu fórum, incluindo validações de conta, tópicos e notificações de mensagem pessoal e sempre que o fórum precise de enviar uma mensagem de correio eletrônico. É recomendável que use um endereço de correio eletrônico como nã[email protected] para indicar oaos membros que eles não pdoem responder à mensagem';


Farewell
-[Costa]
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Cal O'Shaw

Fantastico!

I've been wanting this granularity for some time!  Exactly what we've needed.

I do hope that a number of your MODs, including this one, make it into the final 2.0.0 product.  We need the seperate email addresses, the debug switch, Rules Button (or a generalised multi-page tree function).

Grazie mille!

Cal

DirtRider

http://www.triumphtalk.com

"The real question is not whether machines think but whether men do. "

Qayyom Ashraf

I checked it at my test forum, it works perfectly, but at the live forum, during installation showing this error

An Error Has Occurred!
You cannot download or install new packages because the Packages directory or one of the files in it are not writable!



Settings.php - permissions is 777

any other check list/ possibilities for the error.
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

Qayyom Ashraf

Q: is it important to create/have same ID on web Server?

what if i don't create any id like [email protected], and just mention a dummy ID in settings
Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|

Deprecated

#6
@ Costa:

Thank you for the compliment. ;) And thanks for the translation, I'll try and include that in a future version of this mod.

@ Cal:

Thanks too! I believe that many of us have been caught up in our webmaster address becoming a Sargasso Sea of spam and email bounces, with our database warning messages lost in this mess. This mod package fixes that. :)

You know it's funny that you should say that this mod should go into the 2.0.0 release. What's funny is that it has actually been a feature since the 1.x release! That $modSetting['mail_from'] is nothing new. I just added a configuration panel to be able to access and configure the setting. Anybody who knew could have just added the address using phpMyAdmin. So in a sense the feature IS going to be in the 2.0.0 release. It will be interesting to see if the Developer Team includes the configuration setting.

@ DirtRider:

You are very perceptive. I'll PayPal your bribe payment later today! :D

@ gayyom:

You have some sort of a server problem with your file permissions. It is not related to my mod package. Unfortunately (or fortunately) I have not faced the same problem, and don't know how to solve it, although I've seen solutions discussed here at SMF. I suggest you post your problem in either 1.x or 2.x support boards.


@ All:

What address should you use for your "mail from" setting? This is who the emails will appear to be FROM, the forum's sender address.

In many cases your server software will test this address for validity, meaning that it usually be a properly formed email address, one with a name part, a "@" separator, and a domain name in the second half. In some cases the server will even test this address to see if there is a valid MX (mail exchange) record for that domain. So use a valid domain name.

Do not put something arbitrary in that field. It should be an email address. Furthermore it should be an address that you have permission to use or ownership. The only thing that makes sense to me is to have "something@your_domain.tld" where the "something" you pick and the "your_domain.tld" is your forum's domain. DO NOT use somebody else's domain here!

As far as the "something" part, it's up to you what to pick. I've picked "do_not_reply" and I have chosen to not make that a working email address.

IMPORTANT: I have set my mail server to discard incoming emails to non-valid email addresses and silently drop them. Some servers, particularly servers you do not own, are set to reply to undeliverable emails and tell the sender they are not valid. This is bad!!! If the other end does the same thing you're gonna set up an infinite loop and the Internet might explode! >:D

So whatever address you use, make sure it does not auto-respond to bounce messages! And don't use any address for which you do not have permission or ownership.

I advise everybody to do the following:

  • Pick the name part "do_not_reply" or "NoReply" or something like that.

  • Use your forum's domain as the domain part.

  • Set your mail server to silently drop incoming emails to that email address.

Cal O'Shaw

Oh, there are a lot of things already in SMF, but the problem is they've been hidden, or more accurately, they require one to go in and edit critical files.  Not unlike handing a lit welder's torch to a driver and saying, here, go crawl under your running car and fix that leak in the gas line.  Sure it can be done, but with a very high risk of blowing up!

Maybe because the fix is so easy (just edit a single line to change the outbound email address, or switch into debugging mode) that developers who walk the code everyday don't think about it (probably takes them longer to describe how to change the setting than them just going in and doing it).  But that's why we need MODs like these, to change the settings that are important to the rest of us as we use SMF but not included in the Acp, either because they aren't perceived as important or it never occurs to one.  One of the strengths of SMF I think, the ability of extra eyes to see things that just would never occur to someone else.

[/soapbox]

Cal

Deprecated

The funny thing is that I set out to write this modification, but I discovered that I was getting conflicts with duplicated things. I was astonished to see my code was already in the official released source! :) So I quickly dropped that side of development after ensuring that the code did what I thought it did, and focused on writing the configuration panels for it.

It was amusing wondering if it caused any consternation with the Customization Team since my mod didn't add any feature, just the code to control the feature. It was a sort of odd mod. But a good one! :)

Sudhakar Arjunan

Hi Thanks for this useful mod.

I have already installed a mod named - NoReplyEmails.

Will it affect the current installation.

I have used [email protected] , i mean our domain name in both the mods on modifications - Miscellaneous page.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

stog

#10
hi

excellent thx v much
have installed and tested successfully on one forum but on another (a more complicated "migration" setup)
ive got "
   Execute Modification     ./Sources/ModSettings.php     Test failed

will look into it  and report back thx
(on first look the ModSettings.php file looks quite different from the other successfully modified one)

can i manually add/change the required code to the .php file,
ie just add "

function ModifyMailFromSettings()
{
   global $txt, $scripturl, $context, $settings, $sc;

   $config_vars = array(

      array('text', 'mail_from', '30'),
   );

   if (isset($_GET['save']))
   {
      checkSession();

      saveDBSettings($config_vars);
      writeLog();

      redirectexit('action=featuresettings;sa=mailfrom');
   }

   $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=mailfrom';
   $context['settings_title'] = $txt['mods_cat_mailfrom'];

   prepareDBSettingContext($config_vars);
}

and if so could you advise, many thx

ASIDE
also anyone getting problems with sending mail using sendmail - the fix i found roundabouts was to change if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers))
in Subs-Post.php
to if (!mail(strtr($to, array("\r" => '', "\n" => '')), $subject, $message, $headers, "-f".$webmaster_email))

X3mE

Kids, you tried your best and you failed miserably. The lesson is - never try.

My mods:
OS & Browser Detection (1.5 is out!) | Skype Profile Field | GTalk Profile Field | AllCaps Blocker | SMF Syntax Highlighter (Beta) + 2 in development!

Personal websites:
Mobilize.rs (and forum) | Lolmao.info



Tanks


GohighVoltage

When this mod is uninstalled,   It says it uninstalls,   but it doesn't.   emails are still sent from the [email protected]  email,  even though I uninstalled mod.   Please help?

GohighVoltage

Any ideas?  When this mod is uninstalled,   It says it uninstalls,   but it doesn't.   emails are still sent from the [email protected]  email,  even though I uninstalled mod.

Sabre™

Which version of SMF are you using?
You will need to manually check that the code was removed.
If you require assistance with that, just post which version you are using, and I will help you from there.
Cheers :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)



Sabre™

Okay.
The manual edits are shown [HERE], and are fairly easy to do, so instead of doing it for you, you'd learn better to do this yourself.
So essentially, you want to reverse the process that page shows you.

So in your ManageServer.php, you replace this

array('webmaster_email', $txt['admin_webmaster_email'], 'file', 'text', 30, 'webmaster_email'),


with this

array('webmaster_email', $txt['admin_webmaster_email'], 'file', 'text', 30),


And in your ManageSettings.php, you remove this line

array('text', 'mail_from', '30'),


And then remove what was added for the language files.
If some of the code have already been removed, then just move to the next process.
Post back if you run into any problems, or to let me know how you went.
Good Luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


GohighVoltage

Ok,  I deleted all the things that it installs.  But when i send a newsletter,  it still uses that email address I set in this mod.  Where is the actual email address stored?

Sabre™

I dont know how much you know about navigating your database, but have a look in your db, go to where it states  'smf_settings'  and look within.
Look for something which reads  'mail_from'  and if it is there, drop/remove it.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Advertisement: