Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sending email using SendGrid with Sitecore
<?xml version="1.0"?>
<configuration xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<settings>
<setting name="MailServer" set:value="#{SendGrid.SMTP.server}" />
<setting name="MailServerUserName" set:value="#{SendGrid.SMTP.username}" />
<setting name="MailServerPassword" set:value="#{SendGrid.SMTP.password}"/>
<setting name="MailServerPort" set:value="#{SendGrid.SMTP.port}" />
</settings>
</sitecore>
</configuration>
<system.net xdt:Transform="InsertIfMissing">
<mailSettings xdt:Transform="InsertIfMissing">
<smtp xdt:Transform="InsertIfMissing">
<network host="__SendGrid.SMTP.server__" password="__SendGrid.SMTP.password__" userName="__SendGrid.SMTP.username__" port="__SendGrid.SMTP.port__" />
</smtp>
</mailSettings>
</system.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.