Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

Very strange PHP e-mail error


(!)

ubaldc's Avatar
ubaldc ubaldc is offline
Computer Specs
Junior Member with 4 posts.
THREAD STARTER
 
Join Date: May 2009
Experience: Advanced
26-May-2009, 02:48 PM #1
Question Very strange PHP e-mail error
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.
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,625 posts.
 
Join Date: Oct 2006
27-May-2009, 12:23 AM #2
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()?
ubaldc's Avatar
ubaldc ubaldc is offline
Computer Specs
Junior Member with 4 posts.
THREAD STARTER
 
Join Date: May 2009
Experience: Advanced
27-May-2009, 01:02 PM #3
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
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,625 posts.
 
Join Date: Oct 2006
27-May-2009, 07:20 PM #4
Can you take a screenshot of IE? I'm pretty curious about whats going on.
ubaldc's Avatar
ubaldc ubaldc is offline
Computer Specs
Junior Member with 4 posts.
THREAD STARTER
 
Join Date: May 2009
Experience: Advanced
28-May-2009, 10:06 AM #5
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.
MMJ's Avatar
MMJ MMJ is offline
Senior Member with 3,625 posts.
 
Join Date: Oct 2006
28-May-2009, 11:35 AM #6
Hmm.

Are you trying to close the window with JavaScript?

Try changing the security settings.
ubaldc's Avatar
ubaldc ubaldc is offline
Computer Specs
Junior Member with 4 posts.
THREAD STARTER
 
Join Date: May 2009
Experience: Advanced
28-May-2009, 01:00 PM #7
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
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
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.


Tags
email, php

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑