Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Using SendGrid for Email #3261


User avatar
0
blewis created

We are evaluating using ABP for a new project. We plan on hosting it as an Azure WebApp (PaaS) and direct SMTP is not an option. For other apps we have created in the past (not using ADP), we have used SendGrid. Do I just need to create a new SendGrid Email class inheriting from your EmailSenderBase and inject that? Has anyone already solved this problem?

Thanks, Bryan


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes you need to create a class inheriting from EmailSenderBase and then you need to replace default implementation with your version like this in your module's PreInitialize method.

    Configuration.ReplaceService<IEmailSender, YourSendGridEmailSender>(DependencyLifeStyle.Transient);
    

    Thanks.