News:

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

Main Menu

No Reply Emails

Started by live627, December 29, 2006, 12:31:53 AM

Previous topic - Next topic

live627

Link to Mod
Rate this Mod

This Mod allows you to have all emails sent through SMF's send_mail function to be from a defined email address (usually [email protected]) to allow you to have emails handled when people reply (all based on server mail configuration). All mail not sent though SMF's send_mail function will not have this message suffixed on it.

For your server configuration it is suggested to use [email protected] and have it bounce the emails back to the sender. BlackHole (discard/delete) isn't recommended as the sender has no way of knowing if the mail was received or not.
If your host has cPanel this is easy to set up by going to cPanel -> Mail -> Default Address ->  Set Default Address. Set for your domain this: ":fail: no such address here" without the quotes. You can also define your own message by replacing "no such address here" with your own. Now using noreply will bounce emails back to the sender.

To Setup the options go to Admin -> "Features and Options" . If any of the settings are left blank the mod will attempt to use some default settings.

If you are having problems with emails not bouncing back this is not this mods issue. This mod does not touch any of the servers settings and thus does not affect the mail server(s).

Version 1.0
! Release

bluesyrio

Hi,

I've installed your mod and it has been quite useful to add an extra message in every email sent out (thanks for creating it), however I would like to add an extra line before the message appears after "Regards, The XXXX Team". Any tips? :) Thanks.

SleePy

Well When the sendmail function in SMF gets the message it already contains that.
So the only way would be to disable the current One and add a new one below it.
If you want to try that we can. Just have to Make a few changes to some language files and then to the mod and it should function.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

bluesyrio

Thanks for your reply. If it is so complicated then it will have to do as it is. :) Speaking of this I tried to find the language file for "Regards, etc" but couldn't find it? :(

SleePy

index.english.php:
$txt[130] = "Regards,\nThe " . $context['forum_name'] . ' Team.';


All you would have to do is make that variable blank and then add a new one
$txt[130] = '';
$txt[99130] = "Regards,\nThe " . $context['forum_name'] . ' Team.';


Then edit the code slightly from the mod in Subs-Post.php
Find:
$message .= "\r\n" . (isset($modSettings['NoReplyMessage']) && !empty($modSettings['NoReplyMessage']) ? $modSettings['NoReplyMessage'] : $txt['NoReplyMailDefault'] ) . ' ' . $webmasterReplyEmail;

Replace:
$message .= "\r\n" . (isset($modSettings['NoReplyMessage']) && !empty($modSettings['NoReplyMessage']) ? $modSettings['NoReplyMessage'] : $txt['NoReplyMailDefault'] ) . ' ' . $webmasterReplyEmail . $txt[99130];
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

bluesyrio

Sleepy, I've noticed something:

When the message is an admin email or post notification the email (the real one people can use) at the end is correct, but when it is PM notifications it is not. It shows the no reply email and not the webmaster email.


SleePy

#6
Can you show some examples with the from and the last line which is what is added?
I get them both just fine from my site. Do you got any mods to your personalMessages files that might be using some other method other than the sendmail function in SMF?
What is the Server email? This one should be real so things like connection failures still get to you. You setup the fake one in features and options.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

bluesyrio

Actually it works fine now for me... but I have a general moderator that receives the last line (the whole message) twice, one with the no reply email and other with the webmaster email. I have no clue what could be causing this. I don't receive it doubly like him.

SleePy

That shouldn't happen unless for some reason the Email is being restarted as it is sent.
The No-RE stuff is all done in the sendmail function in SMF at the very start. So unless for some reason the email is being started over that wouldn't make sense.

Does this user use hotmail or yahoo? it could be the fix restarting again with the current message.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

bluesyrio

#9
Yes, he uses hotmail!

Btw, the problem I mentioned before is happening again. I received today an email sent via admin which mentions in the message at the bottom the No reply email and not the webmaster one. We use sendmail.

As for mods, these are the ones we have installed:

1.      VisualWarning      1.31      
2.    No Reply Emails    1.0    
3.    Spoiler Tag    0.3.1    
4.    Users Online Today Mod    1.4.0    
5.    PM On Registration    1.0.2

SleePy

Are you using Yahoo or Hotmail as well?

For his fix I think it is because when SMF detects a hotmail or yahoo user it starts the mail process all over again. Thus causing the problem.

There is a simple way and a hard way to fix this. But for now I will give you the easy way. And apply the hard way to my Sources for when I update it.

Open Subs-Post.php

Find:
//Hmm.. Do we want to Do No Reply Mail?
if(!empty($modSettings['enableNoReply']))


Replace:
//Hmm.. Do we want to Do No Reply Mail?
if(!empty($modSettings['enableNoReply']) && !isset($webmasterReplyEmail))


That should prevent it from working if it already has used the No Reply Email once.
The other way I am fixing it is moving it to after where SMF does its checks.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

bluesyrio

I use gmail. I will try the fix you suggested and give feedback as soon as possible. Thanks.

GJSchaller

Hello!  I'm using v1.2 on my 1.1.4 Forums, and am running into an odd issue.

When I ran the installer, the check failed for Sub-Posts.php, so I went in and manually updated the code - no issues so far.

The mod seems to work fine - I'm getting the email notifications of PMs correctly with the noreply address, no doubles, etc.

However, when I check the error logs on my forums, I see the following occurring VERY frequently:

8: Undefined variable: webmaster_replyemail
File: /home/kradmin/public_html/Components/Forums/Sources/Subs-Post.php
Line: 579

Any idea what may be causing this, and how to correct it?
Geoffrey J. Schaller
Knight Realms - Technical Officer
http://www.knightrealms.com/

SleePy

Hmm

I think it may be a bug.
Does this fix it:
Open Subs-Post.php

Find:
// Keep the Real email for contacting if its spam.
$webmasterReplyEmail = $webmaster_email;


Replace
// Keep the Real email for contacting if its spam.
$webmaster_replyemail = $webmaster_email;

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

GJSchaller

That appears to do the trick - I'm not seeing it in the logs any more.  I'll keep an eye on it and let you know if it comes back up again.
Geoffrey J. Schaller
Knight Realms - Technical Officer
http://www.knightrealms.com/

SleePy

I released 1.3 that fixes this, Since I was in the process of fixing things to fix newsletters issues this just got pushed into that fix as well.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

S3NTYN3L

I'm somewhat confused...

I go into cPanel and set everything up as you've suggested...

Do I put the same message into the " No Reply Message " field in the Admin > Features and Options page of the forum too?

SleePy

The message in there is the message that is added to the very bottom of all emails.

The cPanel setup is just so anyone who still replies back to that email will have it either go no where or bounce back.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

S3NTYN3L

Quote from: SleePy on January 04, 2008, 05:59:02 PM
The message in there is the message that is added to the very bottom of all emails.

Can you show a few examples?

I'm still not following you... :-[

SleePy

I did one of the example email, it is on the mod site page.

Edit, I forgot, I can't img link it here because of security checks :|
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: