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
Subject: contact form name
From: this is the original address that I need to change
Thankyou
change the super user's email address (user no 1 by default named admin
You can add this to your /config/site.php
define('FORM_BLOCK_SENDER_EMAIL ','whatever@what.com');
define('FORM_BLOCK_SENDER_EMAIL ','whatever@what.com');
Thanks everyone seems all good now
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.
Marking answers helps other people in the future with the same problem.
Yep will do just so happens I went for your suggestion!
Most people do, because Mnkras is just a spaz.
J/K Mike! :p
J/K Mike! :p
Ha not heard that word in years!
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.
lol thanks Lucas, but your a spaz as well ;)
( one of my nick names used to me Kras the Spaz, my lastname is Krasnow)
( one of my nick names used to me Kras the Spaz, my lastname is Krasnow)
is there any way to use code to make sender = to a field named 'email' in the form?
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
still no change in the e-mail sender... what am I doing incorrectly
many thanks
<?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
Please remove the space after FORM_BLOCK_SENDER_EMAIL.
define('FORM_BLOCK_SENDER_EMAIL','whatever@what.com');
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.
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.
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.
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?
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);
define('EMAIL_DEFAULT_FROM_ADDRESS', 'myaddress@mywebsite.com');
define('EMAIL_DEFAULT_FROM_NAME', 'Name');
define('FORM_BLOCK_SENDER_EMAIL', EMAIL_DEFAULT_FROM_ADDRESS);
Hi - where would I change these settings in C5.7?
Thanks for you help...
Thanks for you help...
This worked like a charm on 5.7.5.6!
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?
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?
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:
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:
Make sure you replace 'noreply@yourdomain.com' with your desired 'from' email address.
Hope this helps!
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:
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:
Make sure you replace 'noreply@yourdomain.com' with your desired 'from' email address.
Hope this helps!
Don't do that (it will be overwritten since it is "generated". As it says at the very top of that file:
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:
Hope that helps - John
DO NOT EDIT THIS FILE DIRECTLY
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 ) };
Does anyone know how to change the email subject?
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.
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.
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.
It seems that system is getting "address" from 2 different sources and send it as one thing.