Mail form changing from address

Permalink 4 users found helpful
Hi can anyone tell me which file I need to edit to change the email address that was placed in installing process as this is in the email header when sent ie

Subject: contact form name
From: this is the original address that I need to change

Thankyou

clairec
 
Mnkras replied on at Permalink Reply
Mnkras
change the super user's email address (user no 1 by default named admin
LucasAnderson replied on at Permalink Best Answer Reply
LucasAnderson
You can add this to your /config/site.php

define('FORM_BLOCK_SENDER_EMAIL ','whatever@what.com');
clairec replied on at Permalink Reply
clairec
Thanks everyone seems all good now
LucasAnderson replied on at Permalink Reply
LucasAnderson
Could you mark one of us as the official answer, whichever one helped you?

Marking answers helps other people in the future with the same problem.
clairec replied on at Permalink Reply
clairec
Yep will do just so happens I went for your suggestion!
LucasAnderson replied on at Permalink Reply
LucasAnderson
Most people do, because Mnkras is just a spaz.

J/K Mike! :p
clairec replied on at Permalink Reply
clairec
Ha not heard that word in years!
tallacman replied on at Permalink Reply
tallacman
I saw the word 'spaz' in the forums feed and wondered about the thread. Turns out you have a simple answer for a problem that has vexed me for a while. Thanks.
Mnkras replied on at Permalink Reply
Mnkras
lol thanks Lucas, but your a spaz as well ;)

( one of my nick names used to me Kras the Spaz, my lastname is Krasnow)
bowman81 replied on at Permalink Reply
is there any way to use code to make sender = to a field named 'email' in the form?
fraserh replied on at Permalink Reply
Hi I am relatively new to C5 so please excuse whatmay be a stupid question. I downloaded the site.php file added the line of code at the end as shown and reloaded
<?php  
define('DB_SERVER', 'xxxxxxxxx.db.1and1.com');
define('DB_USERNAME', "xxxxxxx");
define('DB_PASSWORD', 'xxxxxxx');
define('DB_DATABASE', 'xxxxxxxxx');
define('BASE_URL', 'http://www.xxxxxxxxxxxxxxxx.co.uk');
define('DIR_REL', '');
define('PASSWORD_SALT', 'xxxxxxxxxxxxxxxxxxxx');
define('FORM_BLOCK_SENDER_EMAIL ','whatever@what.com');

still no change in the e-mail sender... what am I doing incorrectly
many thanks
wdruijter replied on at Permalink Reply
Please remove the space after FORM_BLOCK_SENDER_EMAIL.
define('FORM_BLOCK_SENDER_EMAIL','whatever@what.com');
pakigreenl replied on at Permalink Reply
pakigreenl
So I applied this. Does this work only for the contact form? Or should this work for the notification emails that are sent when someone is sent a message via the C5 profile system? Because I still have it displaying from the site host and not changed to to what I updated in the site.php.
nkennel replied on at Permalink Reply
nkennel
pakigreenl, make sure you've removed the unnecessary space as posted by wdruijter above. I missed this the first time. I don't know the answer to your question about the notification emails though.
creativeorange replied on at Permalink Reply
creativeorange
UPDATE: This procedure breaks your site if you're on 5.5+.... I just lost my site over this code.... I will now go into a hole and die.
nkennel replied on at Permalink Reply
nkennel
Oh no, I'm sorry! Are you sure you've "lost" your site? Does this mean you cannot login? I'm not sure how this bit of code in the config/site.php file could break your site permanently. Can you be more specific about what the issue is?
drbiskit replied on at Permalink Reply
drbiskit
You now need to use this code in your site.php file to enable this functionality (from 5.5 upwards I think):

define('EMAIL_DEFAULT_FROM_ADDRESS', 'myaddress@mywebsite.com');
define('EMAIL_DEFAULT_FROM_NAME', 'Name');
define('FORM_BLOCK_SENDER_EMAIL', EMAIL_DEFAULT_FROM_ADDRESS);
pixeljunkie replied on at Permalink Reply
pixeljunkie
Hi - where would I change these settings in C5.7?
Thanks for you help...
madesimplemedia replied on at Permalink Reply
madesimplemedia
I believe they can all be done in /application/config/concrete.php, although I've only set one of these in a clients 5.7 site:
<?php
return array(
   'email' => array(
        'form_block' => array(
              'address' => 'noreply@yourdomain.com'
        )
    ),
);
?>
Niclas replied on at Permalink Reply
This worked like a charm on 5.7.5.6!
trabanombras replied on at Permalink Reply
Hi,

I have:
# concrete5 Version
Core Version - 5.7.5.3
Version Installed - 5.7.5.3
Database Version - 20150731000000

# concrete5 Packages
Palette (1.0.0), Styled Maps (1.2.1).

I cannot see any file in /application/config/concrete.php and, by the way, I´m not a programmer who knows how to do this modifications. Where in dashboard can I change "from" address?
drbiskit replied on at Permalink Reply
drbiskit
I don't think that you can amend this in the dashboard.

Look in:
/application/config/generated_overrides

There should be a 'concrete.php' file in there. Open it up in a plain text editor (e.g. Use notepad if on a PC, or Sublime Text if on a Mac)

you will probably see something like this:

return array(
    'site' => 'concrete5.7.5.3',
    'version_installed' => '5.7.5.3',
    'misc' => array(
        'access_entity_updated' => 1439300293
    )
);


This is a list (array) of configurations for the site. You may well have a bunch of other stuff in there as well - leave everything as it is, you just need to add in the snippet suggested above to the bottom of the array - so my example would be amended like this:

return array(
    'site' => 'concrete5.7.5.3',
    'version_installed' => '5.7.5.3',
    'misc' => array(
        'access_entity_updated' => 1439300293
    ),
    'email' => array(
        'form_block' => array(
              'address' => 'noreply@yourdomain.com'
        )
    ),
);


Make sure you replace 'noreply@yourdomain.com' with your desired 'from' email address.

Hope this helps!
jasteele12 replied on at Permalink Reply
jasteele12
Don't do that (it will be overwritten since it is "generated". As it says at the very top of that file:
DO NOT EDIT THIS FILE DIRECTLY
For a list of available things that can be set in config/concrete.php see concrete/config/concrete.php - Search for Email settings (line 328 in 5.7.5.13).

What you want to do is create a file config/concrete.php like madesimplemedia said above with something like this in it:
<?php /* application/config/concrete.php - overrides for concrete/config/concrete.php */
return array(
  'email' => array(           // customize From: addresses
    'default' => array(
      'address' => 'you@domain.com',  // general emails
      'name' => 'Domain Webmaster')
    )
    'form_block' => array('address' => 'support@domain.com')  // form emails
  )
};
Hope that helps - John
mjamil4it replied on at Permalink Reply
Does anyone know how to change the email subject?
jasteele12 replied on at Permalink Reply
jasteele12
It's considered bad form to "hijack" a forum discussion with a different subject - you should start a new post with your question.

It also helps to give more information - If you want to change it in code, please state what version of concrete5 you are asking about.

Otherwise, you can change the subject by editing the form block itself.
trabanombras replied on at Permalink Reply
I had done that and now mail server is "saying" that address is wrong: I discovery that "address" is been sent like this: user@domain.comuser@domaim.com as one address only.
It seems that system is getting "address" from 2 different sources and send it as one thing.