jrbush82 Posted September 30, 2010 Share Posted September 30, 2010 I've been struggling with being able to send an e-mail via the php mail() function when the body of the e-mail includes a "unique" URL. The string that will not work is: "https://p11.secure.hostingprod.com/@www.domain.com/dir/directory/file.ext" The point within the string that breaks the capability, is the "/" after www.domain.com. I have tried escaping it like so: "https://p11.secure.hostingprod.com/@www.domain.com\/dir/directory/file.ext" This allows the e-mail to successfully send, however the body of the e-mail contains the backslash as well as the frontslash. Any ideas? Quote Link to comment Share on other sites More sharing options...
premiso Posted September 30, 2010 Share Posted September 30, 2010 I doubt you will be able to fix this as it is really up to how the users Email Application handles URLs. You can try making it a hyperlink using the anchor HTML Tag, which some email applications will allow (along with the plain text link). But other then that there is nothing you can do. Quote Link to comment Share on other sites More sharing options...
jrbush82 Posted October 1, 2010 Author Share Posted October 1, 2010 I doubt you will be able to fix this as it is really up to how the users Email Application handles URLs. You can try making it a hyperlink using the anchor HTML Tag, which some email applications will allow (along with the plain text link). But other then that there is nothing you can do. premiso - appreciate the feedback. I'll give an HTML based e-mail a shot and report back on whether it worked. Either way, at least then someone else using Yahoo hosting may benefit from the knowlege of this. Thanks, jrbush82 Quote Link to comment Share on other sites More sharing options...
jrbush82 Posted October 1, 2010 Author Share Posted October 1, 2010 So I took somewhat of a different approach. I made an assumption and figured the mail parser was having issues due to the @ symbol. With that, I decided to replace the @ symbol using "URL encoding", which as a hexidecimal reference of %40, and it worked like a charm. So... anybody using Yahoo's web hosting and sending a URL with an @ symbol in the body as a part of a URL, recommend using %40 in place of the symbol. Quote Link to comment Share on other sites More sharing options...
premiso Posted October 1, 2010 Share Posted October 1, 2010 So... anybody using Yahoo's web hosting and sending a URL with an @ symbol in the body as a part of a URL, recommend using %40 in place of the symbol. Nice, thanks for responding back with the answer. Quote Link to comment 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.