This topic is locked

REmind Password Email

7/18/2006 8:11:27 PM
PHPRunner General questions
A
Alan4573 author

OK,
I searched the forums but cant find an answer to this.
I set up application no probs. Want to give users the ability to retrieve forgotten login details by email.

Everything works fine - the email is sent correctly to the correct address, however the From details are not as I would like.

The From name and email address are as follows:
Email from: Nobody [nobody@myhostserver.co.uk]
I would like this to read
Email from: Mydomain [noreply@mydomain.com]
Anyone any ideas how I can do this?
Cheers
Alan

W
wrjost 7/19/2006

Hi, Alan,

on June 2, Alexey posted this (worked fine for me... and will maybe be included as standard in the update which will hopefully be coming real soon ...) in reply to osluk's post: "Mail reply address overwritten by system address"
try to modify all calls to mail() function in your files and add fourth parameter with From and Reply-To headers.

I.e. replace this line:
QUOTE

mail($strEmail,"...",$message);
with this one:

QUOTE

mail($strEmail,"...",$message,"From: my@address.com\nReply-To: my@address.com\n");
Best Regards,

Wilfried

A
Alan4573 author 7/19/2006

Thanks Wilfried,
I tried that yesterday, but it didnt work.
I'll keep on trying different things.
Thanks again
Alan

A
Alan4573 author 7/19/2006

Thanks Wilfried,

I tried that yesterday, but it didnt work.
I'll keep on trying different things.
Thanks again
Alan


Anyone know if this can be done in .htaccess?

W
wrjost 7/20/2006

Good morning, Alan,

I cannot understand it doesn't work for you

Thanks Wilfried,

I tried that yesterday, but it didnt work.
I'll keep on trying different things.
Thanks again
Alan


since the following code (from the register.php - haven't had time to change it in remind.php - but mail() works the same all over...) works perfectly for me:

// send email to user

$message="Sie haben sich hiermit erfolgreich bei www.xxx.de registriert, von der IP-Adresse .$_SERVER["REMOTE_ADDR"].\r\n";

$ind=1;
$label = mlang_message("EMAIL");

$message.=$label.": ".$userinfo[$ind++]."\r\n";
$label = mlang_message("USERNAME");

$message.=$label.": ".$userinfo[$ind++]."\r\n";
$label = mlang_message("PASSWORD");

$message.=$label.": ".$userinfo[$ind++]."\r\n";
mail($strEmail,"Ihre Registrierung bei xxx",$message,"From: info@xxx.de\nReply-To: info@xxx.de\n");


Regards,

Wilfried

W
wrjost 7/20/2006

Sorry, quotation marks missing (in the first line of this "old" code...) - it should read:

// send email to user

$message="Sie haben sich hiermit erfolgreich bei www.xxx.de registriert, von der IP-Adresse ".$_SERVER["REMOTE_ADDR"]."\r\n";


Regards,

Wilfried