0

I am using SMTPAppender to send email for an error in my application. I am able to do it if I specify the host settings along with my account user name and password. This is how my config file looks like :

enter image description here

Is it possible to use an anonymous mail account or somehow not use username/password here. I donot want to expose my username/password to the enduser. I have seen people using dummy accounts and the application sends email using the provided account names. I just dont remember how to do it.

Can someone help me out here.

Thanks in anticipation. Monica

Monica
  • 169
  • 2
  • 13

1 Answers1

0

To use a dummy account, you would need to allow unauthenticated access to your SMTP server, which of course makes it possible to be used as an open relay for sending spam.

If you are storing your log4net settings in your app.config file, you should be able to use encrypted configuration settings to encrypt the whole section though.

Eric Petroelje
  • 59,820
  • 9
  • 127
  • 177
  • Hi Eric, can you please elaborate on how to allow unauthenticated access to SMTP server. Any link in this regard will also be useful. – Monica Dec 26 '12 at 21:06
  • @Monica - that's something you would have to set up on the e-mail server itself, and would vary depending on what software you were using for the mail server, so I can't really give you a generic solution there. – Eric Petroelje Dec 26 '12 at 21:08