It should be %20, not #20. And could you not use StringReplace to do this for you? ;-)
Cheers, Conor -----Original Message----- From: Alistair George [mailto:[EMAIL PROTECTED] I tried the following: for i:=0 to Length(mailstring) do if mailstring[i]=' ' then mailstring[i]:=#20; But as you see the subject has 'funnies' in it where the spaces are, and the text gets converted as follows: SystemInformation: --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/