Results 1 to 4 of 4

Thread: If Mail Sent Echo ?? if not echo --.. Should be basic (i hope?) *rslvd*

Threaded View

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    If Mail Sent Echo ?? if not echo --.. Should be basic (i hope?) *rslvd*

    Hey ya,

    Am i right or wrong in thinking this should work?

    I want to tell the user that an email has been sent to their friend, IF it sends sucessfully, & if not, tell them the email failed..

    Is there a code error or?

    PHP Code:
        if(mail($to_name."<".$to_email.">"$subject$message$headers)){
            echo 
    "An email has been sent to ".$to_name." <a href=\"mailto:".$to_email."\">".$to_email."</a> telling him/her about ".$sitename."<BR>\n";
            echo 
    "Thank you for suggesting our website to your friend!<BR>\n<BR>\n";
            echo 
    "<a href=\"".$baseurl."\">Return To The Main Page</a>\n";
        }else{
            echo 
    "Failed to send the email to <a href=\"mailto:".$to_email."\">".$to_email."</a>\n";
        } 
    Last edited by wpearsall; Dec 5th, 2002 at 06:31 AM.
    Wayne

Posting Permissions

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



Click Here to Expand Forum to Full Width