> For the complete documentation index, see [llms.txt](https://aptitude.gitbook.io/zaubercms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aptitude.gitbook.io/zaubercms/extending-zaubercms/email-and-storage-providers.md).

# Email & Storage Providers

There are two providers currently added for handling email and file storage (The media uses this provider for saving media).

### IStorageProvider

Responsible for saving media and files, the built in provider is the DiskStorageProvider that saves files to the local disk

{% @github-files/github-code-block url="<https://github.com/YodasMyDad/ZauberCMS/blob/main-mvc/ZauberCMS.Core/Providers/DiskStorageProvider.cs>" %}

You can replace this by creating your own provider that implements IStorageProvider and then update the appSettings to point to your provider instead of the Disk provider.

```json
"Plugins": {
  "StorageProvider": "ZauberCMS.Core.Providers.DiskStorageProvider",
}
```

### IEmailProvider

The email provider is responsible for sending all emails within the CMS, currently the default provider is an SMTP provider

{% @github-files/github-code-block url="<https://github.com/YodasMyDad/ZauberCMS/blob/main-mvc/ZauberCMS.Core/Providers/SmtpEmailProvider.cs>" %}

Where you can set you your SMTP details in the appSettings

```json
  "Plugins": {
    "EmailProvider": "ZauberCMS.Core.Providers.SmtpEmailProvider"
  }
```

Just like the StorageProvider you can create your own if you implement IEmailProvider and then replace the default one in the appSettings

```json
"Email": {
  "SenderEmail": "name@websitename.co.uk",
  "Smtp": {
    "Host": "smtp.sendgrid.net",
    "Port": 587,
    "Username": "mail_username",
    "Password": "mail_password"
  }
},
```
