ShaolinF Posted July 30, 2007 Share Posted July 30, 2007 Hi Guys, I send php emails to myself and when click on the link it opens a new windows. Is there anyway I can force the link to opened in the current window its in ? Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/ Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 lets see your code its probally a browser preference more then a code you could alwasys use target=_self Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311035 Share on other sites More sharing options...
ShaolinF Posted July 30, 2007 Author Share Posted July 30, 2007 Here you go: <?php $to = "Username <mymail@hotmail.com>"; $subject = "Thank you for your email"; $headers = "From: Sender <email@domain.com>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; $headers .= "Reply-To: Sender <email@domain.com>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSmail-Priority: High\n"; $headers .= "X-mailer: My mailer"; $message .= '<a href="http://www.google.com">http://www.google.com</a>'; mail ($to, $subject, $message, $headers) ?> Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311050 Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 what is opening in a new window? exactly? Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311053 Share on other sites More sharing options...
ShaolinF Posted July 30, 2007 Author Share Posted July 30, 2007 This: $message .= '<a href="http://www.google.com">http://www.google.com</a>'; I think its standard in most email clients to open links in new windows. I just want a way to open the link in the same window. Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311057 Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 ohh your saying when u recive the email on your hotmail you want the link u sent to your self to be opened in the hotmail window! gotcha try makeing the link $message .= '<a href="http://www.google.com" target="_self">http://www.google.com</a>'; Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311067 Share on other sites More sharing options...
ShaolinF Posted July 30, 2007 Author Share Posted July 30, 2007 Nope, that didn't work. Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311082 Share on other sites More sharing options...
soycharliente Posted July 30, 2007 Share Posted July 30, 2007 _parent ? Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311134 Share on other sites More sharing options...
sstangle73 Posted July 30, 2007 Share Posted July 30, 2007 yah you can try _parent but i think it might be something within hotmail so you dont navigate away from them $message .= '<a href="http://www.google.com" target="_parent">http://www.google.com</a>'; Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311228 Share on other sites More sharing options...
ShaolinF Posted July 31, 2007 Author Share Posted July 31, 2007 That didnt work either. Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311828 Share on other sites More sharing options...
soycharliente Posted July 31, 2007 Share Posted July 31, 2007 Your e-mail client is probably forcing a new window. There's most likely nothing you can do about it. From an IA perspective, it's annoying to click a link and have the page redirect. I'd be upset if I wasn't done reading my mail, clicked a link, and lost my inbox. Quote Link to comment https://forums.phpfreaks.com/topic/62491-open-emails-in-current-window/#findComment-311833 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.