When subtituting a whole line like: subst('/^To:.*$/To: fred/'); It appears that the line gets terminated using only a "\n" rather than a "\r\n". This causes problems with some clients. Jeff