How to avoid Special characters (!) in the email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
musammil123
Forum Newbie
Posts: 2
Joined: Tue Mar 16, 2010 11:58 pm

How to avoid Special characters (!) in the email

Post by musammil123 »

Hello ,

I have written the php script to send a email with some contents. I am able to send the email with contents. But in some places the i am getting extra space and ! bet ween the words or characters. could you please suggest me how to solve this issue.


Thanks

Mohamed
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: How to avoid Special characters (!) in the email

Post by Christopher »

It sounds like you might have Ctrl characters in your string. Look at the docs for preg_replace() to find examples of cleaning strings.
(#10850)
Post Reply