c# - log4net: send email which includes hyperlink -
i using log4net smtpappender sending email my-system users.
i need email-body include hyperlink site. so, attached hyperlink message string.
however, seems not right, because since add it- email not sent.
how can add hyper link correctly?
here tried do:
ilog emaillog = log4net.logmanager.getlogger("emaillogger"); string mymsg = "testmsg" + environment.newline + "http://mysiteurl"; emaillog.error(emaildata.msg);
here log4net configuration:
<appender name="smtpappender" type="log4net.appender.smtpappender"> <to type="log4net.util.patternstring" value="%property{toaddress}" /> <from value="myuser@mycomp.com" /> <subject type="log4net.util.patternstring" value="%property{subject}" /> <smtphost value="myhost.net" /> <username value="muusername" /> <password value="mypassword123" /> <authentication value="basic" /> <buffersize value="512" /> <lossy value="true" /> <evaluator type="log4net.core.levelevaluator"> <threshold value="error" /> </evaluator> <evaluator type="log4net.core.levelevaluator"> <threshold value="warn" /> </evaluator> <layout type="log4net.layout.patternlayout"> <conversionpattern value="%newline%message" /> </layout> </appender>
Comments
Post a Comment