Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 xp_readmail's @message has no \r\n?

Author  Topic 

sts
Starting Member

3 Posts

Posted - 2006-01-18 : 11:00:20
Dear All,

I use xp_readmail (SQL2000) with Outlook 2003 to insert emails into database however, after inserting @MessageBody into the text column in the database the data does not have any \r\n\ (no paragraph, just plain long continues varchar) and making it very difficult to read for bigger emails. Please help me how to get around of it.

INSERT INTO vod.dbo.JobsProgress (MessagyBody, JobID, InsertedBy, InsertedDate) VALUES (@MessageBody, @JobID, @Sender, @DateReceived) where MessageBody is text column, @MessageBody is varchar since local variable cannot be text :(

Thanks and appreciate for your any idea.

STS

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2006-01-18 : 15:01:09
It could be that there is only a linefeed and not a linefeed and carriage return. Never went to this depth. You could try a replace for either character 10 or 13 to be replaced with both and see if that solved the problem. Just throwing out something to try.
Go to Top of Page

sts
Starting Member

3 Posts

Posted - 2006-01-19 : 09:08:46
Thanks Druer. I confirmed that the inserted @message in the SQL server has \r\n so problem is between SQL Server and PHP. So it will not be difficult to sort it out.
Go to Top of Page
   

- Advertisement -