G
Guest
Hello,
i have a big problem with my email component, because each time i write the
generated message directly to the spooler, the streamwriter will write in
Unicode.
The file starts with a FF FE and is double byte.
This is a problem because when a mail server like QMAIL receive the message,
will reject for malformed LF.
Infact, the file is Unicode and the normal CR/LF is (0D 00 0A 00) and QMAIL
reading 00 0A fails.
I tried everithing...
The code:
StringWriter SW = new StringWriter(new StringBuilder());
SW.WriteLine("x-sender: <" + this._From.Address + ">");
[...]
string message = SW.ToString();
using (StreamWriter sw = new StreamWriter(filename,true,Encoding.ASCII))
{
sw.Write(message);
}
Please help,
Regards
Stefano
i have a big problem with my email component, because each time i write the
generated message directly to the spooler, the streamwriter will write in
Unicode.
The file starts with a FF FE and is double byte.
This is a problem because when a mail server like QMAIL receive the message,
will reject for malformed LF.
Infact, the file is Unicode and the normal CR/LF is (0D 00 0A 00) and QMAIL
reading 00 0A fails.
I tried everithing...
The code:
StringWriter SW = new StringWriter(new StringBuilder());
SW.WriteLine("x-sender: <" + this._From.Address + ">");
[...]
string message = SW.ToString();
using (StreamWriter sw = new StreamWriter(filename,true,Encoding.ASCII))
{
sw.Write(message);
}
Please help,
Regards
Stefano