Jump to content

Problem with mail() and string with "unique" URL


jrbush82

Recommended Posts

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?

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.

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.