<p>In craft 3 it appears you can access it by doing the following:</p>

<p><code>{{ craft.systemSettings.email.fromEmail }}</code></p>

CC BY-SA 4.0
2018-08-08T02:27:35.157Z
2018-08-08T02:27:35.157Z
jnowland
<p>The <code>craft.systemSettings</code> variable was been deprecated as of Craft 3.1.0, and <a href="https://github.com/craftcms/cms/blob/develop/CHANGELOG.md#removed-2" rel="nofollow noreferrer">removed in Craft 4.0</a>.</p>
<p>Here's how to get the system email address in Craft 3.1.0+:</p>
<pre><code>{{ craft.app.projectConfig.get('email').fromEmail }}
</code></pre>
<p>Important: If your system email is set to an environment variable (e.g. like <code>$SYSTEM_EMAIL_ADDRESS</code>), you can use the <a href="https://craftcms.com/docs/4.x/dev/functions.html#parseenv" rel="nofollow noreferrer"><code>parseEnv()</code></a> Twig function to render it:</p>
<pre><code>{{ parseEnv(craft.app.projectConfig.get('email').fromEmail) }}
</code></pre>
<p>Other email settings such as <code>replyToEmail</code> and <code>fromName</code> are also available via <code>craft.app.projectConfig.get('email')</code>, and can be access and used in the same way as the <code>fromEmail</code>.</p>
<p>Alternatively, email settings can be accessed via the <code>App</code> helper class, although it is generally discouraged to instantiate the <code>App</code> helper class from Twig:</p>
<pre><code>{% set appHelper = create('craft\\helpers\\App') %}
{{ appHelper.mailSettings.fromEmail }}
</code></pre>
<p>Or in PHP:</p>
<pre class="lang-php prettyprint-override"><code>$fromEmail = App::mailSettings()-&gt;fromEmail;
</code></pre>

CC BY-SA 4.0
2021-11-07T00:46:16.833Z
2023-03-24T08:43:12.830Z
2023-03-24T08:43:12.830Z
Mats Mikkel Rummelhoff
<p>You can get this in a template like so:</p>

<pre><code>{# returns an array of your email settings #}
{% set settings = craft.systemSettings.email %}

{# returns the email address #}
{{ settings.emailAddress }}
</code></pre>

<p>And in a plugin you can do:</p>

<pre><code>craft()-&gt;systemSettings-&gt;getSetting('email', 'emailAddress')
</code></pre>

CC BY-SA 3.0
2015-06-08T12:50:24.893Z
2015-06-08T12:50:24.893Z
Alec Ritson
<p>From a template or a plugin, how can I get the value of admin/Settings/System Email Address ?
Thanks for your help
Nicolas</p>

<templating><emails>
How do I get the Settings System email Address?
# How do I get the Settings System email Address?

(Asked by: username_0 on 2015-06-08)

From a template or a plugin, how can I get the value of admin/Settings/System Email Address ?
Thanks for your help
Nicolas

**Tags:** templating, emails


---

## 3 answers

### Answer by username_3 on 2015-06-08. Score: 13 | Accepted answer

You can get this in a template like so:
{# returns an array of your email settings #}
{% set settings = craft.systemSettings.email %}

{# returns the email address #}
{{ settings.emailAddress }}

And in a plugin you can do:
craft()->systemSettings->getSetting('email', 'emailAddress')


---

### Answer by username_1 on 2018-08-08. Score: 3

In craft 3 it appears you can access it by doing the following:

`{{ craft.systemSettings.email.fromEmail }}`


---

### Answer by username_2 on 2021-11-07. Score: 3

The craft.systemSettings variable was been deprecated as of Craft 3.1.0, and removed in Craft 4.0.
Here's how to get the system email address in Craft 3.1.0+:
{{ craft.app.projectConfig.get('email').fromEmail }}

Important: If your system email is set to an environment variable (e.g. like $SYSTEM_EMAIL_ADDRESS), you can use the parseEnv() Twig function to render it:
{{ parseEnv(craft.app.projectConfig.get('email').fromEmail) }}

Other email settings such as replyToEmail and fromName are also available via craft.app.projectConfig.get('email'), and can be access and used in the same way as the fromEmail.
Alternatively, email settings can be accessed via the App helper class, although it is generally discouraged to instantiate the App helper class from Twig:
{% set appHelper = create('craft\\helpers\\App') %}
{{ appHelper.mailSettings.fromEmail }}

Or in PHP:
$fromEmail = App::mailSettings()->fromEmail;


---

