Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Slashes in emails?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Slashes in emails?

Postby mako1200 » Tue Oct 08, 2002 1:10 pm

Ok.....I have a new question...

When I send a email using the mail() function, anytime there is a apostrophe, it is sent with an escape character:

isn't --> isn\'t

Is there something I need to do before the email is sent to prevent this? Or does this depend on the mail application the server is using?

--MaKO
mako1200
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Oct 08, 2002 12:06 am

Postby DoppyNL » Tue Oct 08, 2002 1:28 pm

you can strip the slashes of the contents with the function stripslashes

Greetz Daan
DoppyNL
 

Thats what I was thinking...

Postby mako1200 » Tue Oct 08, 2002 6:44 pm

I thought about using that too.....but what if the email acutally contained legit slash characters?

Thanks for your help, Doppy...=>

--MaKO
mako1200
New php-forum User
New php-forum User
 
Posts: 4
Joined: Tue Oct 08, 2002 12:06 am

Postby DoppyNL » Tue Oct 08, 2002 10:52 pm

That function will only remove slashes that are used to escape characters that come after it.
If there is another character it will not be removed.

Another point, if you're message is filled with slashes, then somehow php has run addslashes on it, so you can undo that with stripslashes.

Greetz Daan
DoppyNL
 


Return to PHP coding => General

Who is online

Users browsing this forum: Google Feedfetcher and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.