Results 1 to 2 of 2

Thread: Sending an e-mail through a function

  1. #1

    Sending an e-mail through a function

    Hello,

    I am using PHP to send e-mail to people who subscribe to other users posting content. I call the function and it retrieves the e-mails which have subscribed to this user who has posted something.

    Then I use the mail() function however it will not work when I try to put headers on the e-mail such as the From or Reply-To header.

    Any ideas? I have already tested the mail and it works outside of the function.

    Thanks

  2. #2
    Post your code.
    Most likely something like this is happening:
    PHP Code:
    $send "email";
    dosend($send);
    // works ^^

    ////////////////////


    $send "email";
    function 
    sendthis() {
    dosend($send);
    }
    /// doesn't work as $send isn't in the scope of the sendthis function 
    hard to explain but when I see your code it will be easier.
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012