I've written some email code and I'm required to send all emails with a signature.
I was asked to store the signature in the appsettings of the web.config file.
I'm not sure if this is the correct place. Can someone advise me otherwise? As far as I know there is only going to be one email signature in there.
I tried:
<appSettings>
<add key="CompanyEmailSignature" value="The Biscuit Factory\n\r
Somewhere in the Bahamas\n\r
<a href="http://www.thebiscuitfactory.com">The Biscuit Factory</a>\n\r
Our mission is to make tasty biscuits" />
</appSettings>
I'm unsure however how to escape for the link. I had a look at some suggestions and tried:
<a href=""http://www.thebiscuitfactory.com"">The Biscuit Factory</a>
and I tried:
<a href=\"http://www.thebiscuitfactory.com\">The Biscuit Factory</a>
but couldn't get it to work.
Can anyone tell me how to escape this and also if there is somewhere else this would be better stored?
Did you already try changing <
and >
into <
and >
?
<
and >
are not allowed inside an xml (appsettings) attribute.
Also for the "
you can try using "
So in the end you have this:
<appSettings>
<add key="CompanyEmailSignature" value="
The Biscuit Factory\n\r
Somewhere in the Bahamas\n\r
<a href="http://www.thebiscuitfactory.com">The Biscuit Factory</a>\n\r
Our mission is to make tasty biscuits
" />
</appSettings>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With