Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.