Click here to Skip to main content
15,897,371 members
Articles / Web Development / ASP.NET

Email Providers (SMTP/GMail) using Provider Design Pattern

Rate me:
Please Sign up or sign in to vote.
4.56/5 (7 votes)
27 Dec 2013CPOL2 min read 18.6K   328   29  
Configure different email provider sources using the Provider design pattern
<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <configSections>
    <section name="EmailSend" type="Provider.EmailSender.EmailProviderConfiguration, Provider.EmailSender"/>
  </configSections>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
 
    <EmailSend default="SMTPProvider">
      <providers>
        <add name="SMTPProvider" type="Provider.Email.SMTP.SMTPProvider, Provider.Email.SMTP"/>
        <add name="GmailProvider" type="Provider.Email.Gmail.GMailProvider, Provider.Email.Gmail"/>
      </providers>
    </EmailSend> 
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions