Panic when sending email

Configured tyk analytics like so:

"email_backend": {
    "enable_email_notifications": true,
    "code:": "sendgrid",
    "settings": {
      "ClientKey": "<redacted>"
    "default_from_email": "",
    "default_from_name": ""

Getting a 502 and this panic in log, whenever the app tries to send an email:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xa7b094]
 goroutine 3474 [running]:
main.(*MetaBackend).Send(0x1462c60, 0xc42068c040, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc60a57, ...)
	/src/ +0x1b4
main.NotifyUserByEmailOfKeyRequestSuccess(0xc4205d9720, 0xc4205f4c00, 0x38, 0x0, 0x0, 0xc4205d9680)
	/src/ +0x3c0
created by main.KeyRequestHelper.NotifyParties
	/src/ +0x11e

Please ignore. I messed up the configuration pretty badly. I got it working now.

Actually, don’t ignore. The reason I messed up the config is because your documentation is wrong:
Note the colon in "code:": "smtp",

Hi Pavle,

Good catch! We will make sure documentation is corrected.