Recent Topics

1 Feb 22, 2007 19:55    

My b2evolution Version: 1.9.x

I have a recent installation of 1.9.2. I seem to recall entering an email address during the installation and I used an existing email address. Now that I have a new domain set up, I have a new email address that I would like to use.

When a new user registers, they get a validation email from "info@OLDEXISTINGDOMAIN," and I now want it to come from "info@NEWDOMAIN".

I found a previous thread "[url=http://forums.b2evolution.net/viewtopic.php?t=8850&start=0&postdays=0&postorder=asc&highlight=email+user]Email with validation link[/url]", but I didn't have any luck. Perhaps something has changed in 1.9.2?

I have changed the "$notify_from =" address in conf/_advanced.php, but it didn't seem to have any effect on the validation email for a new user. It still gets sent from "info@OLDEXISTINGDOMAIN."

Any help would be appreciated.

Thank you!

2 Feb 22, 2007 20:02

In conf/_basic_conf.php you'll find on line 92-96:

/**
 * Your email. Will be used in severe error messages so that users can contact you.
 * You will also receive notifications for new user registrations there.
 */
$admin_email = 'someone@somewhere.xxx';


My guess is that you want to change this one.

3 Feb 22, 2007 20:05

Thanks, Afwas... I had already changed that one as well. Didn't have any effect on the validation email to the user.

EDIT: Strange thing is that the email that I get notifying me that someone has registered, it does come from the NEWDOMAIN. I would think that the validation email to the user would come from the same place.

4 Feb 28, 2007 19:10

I still haven't been able to figure out where this address if coming from for the "validation email." If anyone can point me in the right direction, I would appreciate it.

5 Mar 01, 2007 16:21

Here is what I have found out...

The address comes from our PHP.INI file:

[mail function]
; for Win32 only.
SMTP="ourmailserver"; for Win32 only
smtp_port=25
sendmail_from="info@OLDDOMAIN.com"

We have changed this address and it does change the from address on the validation emails. The problem is that we host several domains on that server and I don't want to change this email address for all of them. Can someone tell me if it is possible to change the b2e code to use a different address besides the one in the PHP.INI file?

6 Mar 03, 2007 07:06

In inc/MODEL/users/_user.class.php around line 877 (function send_validate_email) try adding NULL for the from field, like so:

$r = send_mail( $this->email, sprintf( T_('Validate your email address for "%s"'), $this->login ), $message, 'NULL' );

Basically the send_mail for telling you someone registered uses $notify_from in that place, which is the email addy in conf/_advanced.php. The send_verify_email function doesn't specify what to use, so if you tell it NULL it'll interpret that to mean use $notify_from. The problem is that when I registered on a blog I run I got both emails from the same source, so I don't know why you didn't.

Anyway it's worth a shot. Maybe.

7 Mar 06, 2007 18:04

Thanks, Ed! You are truly a "SuperGuru."

Just to let you know my results...

I used 'NULL' as you suggested and the FROM address showed up as NULL. So, I replaced 'NULL' with 'info@NEWDOMAIN.com' and it worked great! The "X-Originating" address is still the the address configured in PHP.INI, but the FROM address is now correct and it uses the correct email address for any replies that I might get.

Thanks a million!

UPDATE: I was so inspired by your help - and everyone's contributions to these forums, that I just became a Gold Donor. Well worth it for the value of the product and the available support.

8 Mar 07, 2007 03:05

rfranco wrote:

Thanks, Ed! You are truly a "SuperGuru."

UPDATE: I was so inspired by your help - and everyone's contributions to these forums, that I just became a Gold Donor. Well worth it for the value of the product and the available support.

If EdB got a dollar for every serious and meaningfull answer he gave on the forum, he'd have $3069 by now.


Form is loading...