Mail encoding?

3 Messages Forum Options Options
Embed this topic
Permalink
jschell
Mail encoding?
Reply Threaded MoreMore options
Print post
Permalink
For the Mail Target it does not appear that "encoding" is implemented.

In Mail.cs there is a property for "Encoding".  It appears to be set when the configuration file is run.

However in the MailTarget code it doesn't use that property nor does it use the member variable "_encoding" (except in the Property code.)

Conversely the following code shows up in several places.

    msg.BodyEncoding = System.Text.Encoding.UTF8;

Modifying those to the following seems to allow it to work.

    msg.BodyEncoding = _encoding;


Boersnoes
Re: Mail encoding?
Reply Threaded MoreMore options
Print post
Permalink
Thanks for the contribution.
Does the mail target work properly? What happens when multiple lines are sent seqentially?
Does it generate all seperate mails?
jschell
Re: Mail encoding?
Reply Threaded MoreMore options
Print post
Permalink
Encoding would have no impact on the questions you asked.

However the answers to your questions.....

> Does the mail target work properly?

It sends email.

As for 'properly'....
1. See below
2. As I understand it MS API caches SMTP connections.  If a server bounces the cache is no good.  Or if a firewall drops the connection due to inactivity it is no good. Thus a send can fail because of that.  A single retry could fix that.  I will be testing that explicitly later.

> What happens when multiple lines are sent seqentially? Does it generate all seperate mails?

As coded the target can end up sending multiple postings in a single email.  That seems odd to me.

Whether that happens or not probably depends on how quickly the posts are sent and if wrappers are used like the AsyncWrapper. Conversely EventLog doesn't do that.  The only targets that do that are File/MessageBox and those would seem to me to be candidates for that.

Note that multiple events are appended to each other explicitly using "\n".  That seems odd.  Although I suppose that could be a SMTP standard.