Hi everyone,

 

I got a problem with emailing in PHP.  Any help is appreciated.  

 

Here's the situation:

 

I have a webpage takes some information from user and submit it to
database, then it'll sent out an email.  When clicking on the submit
button, it takes browser at least 10 seconds to finish the action.  Both
inserting data to database and sending email are successful.  But I
don't think it should take that long.  Also, if I stop browser in the
middle, actions will still be completed.  

 

I set up this function to do email

 

 

function do_email($to_whom, $to , $subject, $body, $header)

  {

    if(mail($to, $subject, $body, $header))

       echo("<tr><td><font color=\"red\">An Email is on the way to
$to_whom

             </font></td></tr>");

    else

       echo("<tr><td>ERROR occurred while atttempting to send an
email!</td></tr>");

 }

 

 

Please help.

 

Reply via email to