[BETA] Set Real Email Return Path

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
Thoul
Registered User
Posts: 810
Joined: Sun Jun 23, 2002 1:25 am
Location: USA
Contact:

[BETA] Set Real Email Return Path

Post by Thoul »

Here's a short little MOD to fix a problem a lot of us have and probably don't even know about! The way phpBB sets the Return Path header of emails sent without using SMTP causes the Return Path to work incorrectly for a lot of boards. This fixes it if you've got PHP 4.0.5 or greater.

Update:
Version 1.1.0 is now available on the sites in my signature. It changes the code to be added so that there (hopefully) shouldn't be any errors on systems using a version of PHP prior to PHP 4.0.5.
Last edited by Thoul on Fri Mar 21, 2003 8:24 pm, edited 2 times in total.
MrStormyNights
Registered User
Posts: 94
Joined: Mon Mar 25, 2002 5:52 pm

Won't work on < PHP 4.05 or will it cause errors?

Post by MrStormyNights »

Just wondering? Will it cause problems on PHP versions prior to 4.05? or is it just that it won't work. Need to know as, MJ from FullyModded may add this if it won't cause errors or break something.

Is there maybe a way to do a version check and add an if condition based on the results?
talia679
Registered User
Posts: 716
Joined: Tue Mar 12, 2002 4:07 pm
Location: PA
Contact:

Post by talia679 »

I was wondering the same thing.
Thanks, Talia
Tag You're It Writing Community || TYI Forums
Taleria - Talia's Gallery of 2000+ Links & 140+ Books
GameCrafters Guild – Gaming info and resources
Thoul
Registered User
Posts: 810
Joined: Sun Jun 23, 2002 1:25 am
Location: USA
Contact:

Post by Thoul »

To be honest, I'm not sure how it will behave in versions of PHP prior to 4.0.5. There was a fifth parameter added to PHP's mail() function in that version, and this mod relies on using that parameter. I know the mod won't work in the prior versions, but I don't know if not being able to pass that extra parameter to the function cause any of PHP's built-in error messages to appear or not.

A version check should be pretty simple to do. The PHP version is stored in a constant called PHP_VERSION, so a simple if (foo==bar) type of thing should be a piece of cake.
MrStormyNights
Registered User
Posts: 94
Joined: Mon Mar 25, 2002 5:52 pm

Could you add it to this mod?

Post by MrStormyNights »

A piece of cake for you maybe, but for PHP wannabe's like me, I am not sure exactly what would be needed, I could eventually figure it out, but if it's a piece of cake for you, I would rather see your master touch at work.

Since I am not sure what your intentions are, I have to ask, Could you post the changes necessary or update this mod to include the "if" condition logic?
Thoul
Registered User
Posts: 810
Joined: Sun Jun 23, 2002 1:25 am
Location: USA
Contact:

Post by Thoul »

:evil: Give me time. I do have to sleep at some point.
Thoul
Registered User
Posts: 810
Joined: Sun Jun 23, 2002 1:25 am
Location: USA
Contact:

Post by Thoul »

Done. See the first post for update information.
Luciouslinda
Registered User
Posts: 190
Joined: Thu Dec 26, 2002 6:12 am
Location: Singapore
Contact:

Post by Luciouslinda »

Well i am getting a nice error

General Error

Blah Blah

Error on line 232 of

Blah Blah /includes/emailer.php

I have this installed and well it is not working..... I have checked my emailer.php file and it seems that it was already there.... Is there anything that i can do to rectify this problem?

It is obviously only when an Email needs to be sent out.... But on registrations no email is being sent and this could cause a problem to my users... Please help.

Thanks
Linda
Thoul
Registered User
Posts: 810
Joined: Sun Jun 23, 2002 1:25 am
Location: USA
Contact:

Post by Thoul »

The best bet in your case would probably be to uninstall the mod or replace your emailer.php with an older copy (hopefully you backed up the file before added the mod).
Luciouslinda
Registered User
Posts: 190
Joined: Thu Dec 26, 2002 6:12 am
Location: Singapore
Contact:

Post by Luciouslinda »

Yeah it is ok, thanks for that, i have sorted it out.... I always keep a back up of totally unalter files just incase i have problems....

Thanks for the reply
Linda
Post Reply

Return to “[2.0.x] MODs in Development”