I was using :
xp_sendmail ....,@attachment='t:\..'
and I was getting this error :
Server: Msg 18025, Level 16, State 1, Line 0
xp_sendmail: failed with mail error 0x80004005
Instead of that I tried to use this :
xp_sendmail ..,@attachment='\\server\dir\..'
and it worked. So just using a UNC name fixed this problem.
Thanks.