This topic is locked

Registration page notification email - always from NOBODY

10/10/2007 1:15:50 PM
PHPRunner General questions
G
gawde author

Anyone experiencing this problem?
I using the registration page features to "send email to user" and "send email to admin". In Email Settings, I have selected the user email field and provided the "From" email address. Everyone receives the emails but the "from " is always "Nobody". It seems to ignore the From address provided. I've tried quotes, no quotes and it's always Nobody. Is there a php.ini parameter or server email parameter I need to set? We're on a Unix/Apache hosting box.

Greg

J
Jane 10/11/2007

Greg,
try to add from parameter to the mail function.

Here is a sample:

...

// To send HTML mail, the Content-type header must be set

$headers = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers

$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";

$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
mail($to, $subject, $message, $headers);

G
gawde author 10/11/2007

Greg,

try to add from parameter to the mail function.

Here is a sample:

G
gawde author 10/11/2007

Greg,

try to add from parameter to the mail function.

Here is a sample:


Thanks Jane.
I added the $headers to the email function in registration.php and that did the trick.
I am curious however, where is the "From" email address, input on the PHPRunner Security page, used?

N
nicolagrimshaw 1/29/2008



Thanks Jane.
I added the $headers to the email function in registration.php and that did the trick.
I am curious however, where is the "From" email address, input on the PHPRunner Security page, used?


I have the same problem too! I wish I understood PHP better - I can kinda read and (vaguely) understand but everytime I try to 'fix' a problem like this I 'break' something else...

R
rainerwolf 4/5/2008

Greg,

try to add from parameter to the mail function.

Here is a sample:


Hi Jane, please can you tell me, where i found the mail function in register.php?
Rainer Wolf

J
Jane 4/7/2008

Rainer,
to add sending emails check off Send email ... options on the User login settings dialog on the Security tab.

R
rainerwolf 4/29/2008



Thanks Jane.
I added the $headers to the email function in registration.php and that did the trick.
I am curious however, where is the "From" email address, input on the PHPRunner Security page, used?


Hi Greg,
please, can you tell me, where did you add the $headers in registration.php ? Is it possible, to show me the code from registration.php?
Thank you very much

M
mmponline 5/13/2008

I also need to know where to place $headers snippet. Does not work in after successful registration.
I like the automated registration proccess to both user and admin. Just need to get rid of the "nobody".

J
Jane 5/13/2008

Hi,
find mail(...) function in the generated register.php file and add additional headers just before.