3

I want to carry the machine name in ELMAH subject line. As in developing environment want to keep the track that from which machine error is coming. So I want implement subject line with proper machine name. What I should do?

<elmah>
    <errorMail name="exceptionMail" 
       from="devsupport@abc.co.in" 
       to="devsupport@abc.co.in" 
       async="true"  
       subject="Error log from [should come machine name here]" 
       smtpPort="0" 
       useSsl="true"/>
    <security allowRemoteAccess="yes" />
</elmah>
Anudeep
  • 337
  • 2
  • 4
  • 13

1 Answers1

4

As far as I can see, there's no way to do this in config alone - you would have to write some code to handle this requirement.

On the other hand - it seems pretty simple and straightforward to write that code.

See this blog post Customizing ELMAH’s Error Emails by Scott Mitchell on how to do it.

Handcraftsman
  • 6,863
  • 2
  • 40
  • 33
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459