1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Very strange PHP e-mail error

Discussion in 'Web Design & Development' started by ubaldc, May 26, 2009.

Thread Status:
Not open for further replies.
Advertisement
  1. ubaldc

    ubaldc Thread Starter

    Joined:
    May 26, 2009
    Messages:
    4
    we have some php code running on a linux machine. (sgi based).
    php is V5.0 accessing a mysql database. this web code has worked for years on an irix based machine.

    problem: e-mail (using sendmail) is only working in certain circumstances.
    all code calls the same code as follows:

    $mailer = popen("/usr/sbin/sendmail -t -i","wb");
    fwrite($mailer, "From:$email_from_name<$email_from_mail>\n");
    fwrite($mailer, "To: $email_to\n");
    fwrite($mailer, "Cc: $email_cc\n");
    fwrite($mailer, "Subject: $email_subject\n");
    fwrite($mailer, "X-Mailer: PHP/" . phpversion(). "\n");
    fwrite($mailer, "X-Sender-IP: $REMOTE_ADDR\n");
    fwrite($mailer, "Content-Type: text/html");
    fwrite($mailer, "\n".$emailbody."\n");
    pclose($mailer);

    here is the problem: the code if executed in the main window, will cause IE V6.0 to ask you to close the browser. you can select no, and the e-mail will be sent. we also have a javascript generated secondary window that this code will work through without asking to close the browser.

    any direction would be greatly appreciated.
     
  2. MMJ

    MMJ Guest

    Joined:
    Oct 15, 2006
    Messages:
    3,625
    IE 6 is asking to close the browser? What?

    What's the output you are returning to the browser?

    Why don't you use mail()?
     
  3. ubaldc

    ubaldc Thread Starter

    Joined:
    May 26, 2009
    Messages:
    4
    1. ie6 is trying to close the browser.
    2. output to browser is just another web page or the return to the previous. part of this system is to generate an e-mail to tell the user something has occured.
    3. mail() from what I can see this points back to whatever you sent it to, in our case linux/unix sendmail.

    i am in no way sending a message to tell the browser to close.

    our PC's in UTC are locked down. i believe this is related to an IE setting.
    i am hoping to contact the powers that be and see if I can change the settings.

    thanks for the quick reply.

    Chris
     
  4. MMJ

    MMJ Guest

    Joined:
    Oct 15, 2006
    Messages:
    3,625
    Can you take a screenshot of IE? I'm pretty curious about whats going on.
     
  5. ubaldc

    ubaldc Thread Starter

    Joined:
    May 26, 2009
    Messages:
    4
    gladly.. i am not sure I can attach file://d:/close_error.doc
    why don't I think this will work.. but if not, the text is:
    the web page you are viewing is trying to close the window.
    do you want to close this window. yes or no.
    the border title is "Microsoft Internet Explorer"

    thanks for your help. this one has me completely befuddled.
     
  6. MMJ

    MMJ Guest

    Joined:
    Oct 15, 2006
    Messages:
    3,625
  7. ubaldc

    ubaldc Thread Starter

    Joined:
    May 26, 2009
    Messages:
    4
    i am not trying to close the window, anywhere. i am just sending an e-mail and moving on. that is the mystery.

    security settings are locked thanks to corporate IT "we know what is best for you" thinking. i can't change anything.

    thanks
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/830162