Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.