Jump to content

Mail Function Fails


unemployment

Recommended Posts

My mail function is failing a I don't know why.  I have tested it on my index and it seems to work, but not on my sign up.

 

<?php

$invbody = <<<EMAIL
Hello <[fname]>,

You've registered and need to activate your account. Click the link below or paste it into the URL bar of your web browser.

http://mysite.com/activate.php?id=<[id]>&code=<[code]>

Thanks!

Team
EMAIL;

$u_info = fetch_user_info_reg($id);

$invbody = str_replace(array('<[fname]>', '<[id]>', '<[code]>'), array($u_info['firstname'], $u_info['id'], $u_info['code']), $invbody);

mail($u_info['email'], 'Activate Your Account', $invbody, 'From: [email protected]');

?>

 

Here is the pre of $u_info

 

Array
(
    [0] => Array
        (
            [id] => 67
            [firstname] => fgsgs
            [email] => [email protected]
            [code] => 13059599
        )

)

 

Link to comment
https://forums.phpfreaks.com/topic/243499-mail-function-fails/
Share on other sites

Here is the pre of $u_info

 

Array
(
    [0] => Array
        (
            [id] => 67
            [firstname] => fgsgs
            [email] => [email protected]
            [code] => 13059599
        )

)

 

If that's correct then the email address is located at $u_info[0]['email'] not $u_info['email']

Link to comment
https://forums.phpfreaks.com/topic/243499-mail-function-fails/#findComment-1250308
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.