Form Submissions getting blocked

Permalink
Hey guys,

How can I change the "From" part of emails that come from contact forms? One of my clients domain registrars are blocking the from Concrete5@www.domainname.co.nz

It's a bit of an ugly way to do the from isn't it anyway? Can I change this, where in the code can I change this to fix this problem, perhaps even without the www may work.

Can I just change it to be the form name, or something?

Please let me know ASAP.

Thanks guys
YOu rock

Sparx
 
Tony replied on at Permalink Reply
Tony
try changing the email address of the admin user.
Sparx replied on at Permalink Reply
Sparx
Hey Tony - cheers

I am talking about when a form submission comes through, It comes with the FROM in the email Concrete5@www.louvretec.co.nz how can i change that, that's whats getting it marked as spam and bouncing..

Thanks
Tony replied on at Permalink Reply
Tony
I think from concrete5.3 the from address for that form block has been set to the email address of the admin super-user. Maybe you're using an older version of concrete before this change took effect? Otherwise you can have a look at the FormBlockController::action_submit_form() method, and set it where the mail config settings are done with this line: $mh->from( 'user@domain.com' );

btw, did you figure out that other problem you were having with your contact form not submitted correctly?
Sparx replied on at Permalink Reply
Sparx
Well it is running Concrete 5.3, not 5.3.1.1. If that will make a difference.

I got the contact forms working, but had to change server to fix it. Host didn't know what was wrong so shifted me to another server and it worked fine. Weird huh.

Will try that bit of code now.
Sparx replied on at Permalink Reply
Sparx
I added that bit of code and then it just brought up a blank page when submitted...
katz515 replied on at Permalink Reply
katz515
/concrete/mail/block_form_submission.php

Add this line

$from = array('MAIL@MAIL.COM', 'NAME');


And remove all the changes that you made. It's working in 5.3.1.1
Sparx replied on at Permalink Reply
Sparx
That changed it - and just waiting to hear back to see whether that fixes their problem for SPAM. Awesome.

One more thing if you don't mind - i did a chagne over fromhttp://www.sparx.co.nz/louvretec/ tohttp://www.louvretec.co.nz and most images are working fine, although theres some pages, that aren't showing the images, but when I click edit mode, it shows the images fine????

Any ideas on how to fix this????

Thanks so much for everybodys support.
katz515 replied on at Permalink Reply
katz515
Unfortunately, I haven't found better solution but re-insert the image if you change the DIR_REL in site.php.

This happened because you inserted the image into the Content block instead of image block type. The link is static.

If you use "Image" block, the URL changes automatically. This would be fine because the link is dynamic...

Your old place image URL looked like...
src="/[DIR]/index.php/download_file/-/view_inline/XXX"


And you have to change them to
src="/index.php/download_file/-/view_inline/XXX"


So, faster way is

1. Open the Content Block
2. Click "HTML" icon to view the code
3. Find and Replace "index.php/download_file/" part

I think you can do this in firefox.

I know you need to do for every single content block...

I had the same experience....

So next time, I would use the subdomain for my testing environment instead of directories.....

Lesson learned...
Sparx replied on at Permalink Reply
Sparx
What I actually did, I realised there would be that problem, so I opened the SQL file, and just did a massive find and replace in the SQL backup of the datbase... so now it just shows in the html..

<img src="index.php/download_file/-/view_inline/121"

Is that the right format??

Have I mucked it up somehow?

Cheers bro!
katz515 replied on at Permalink Reply
katz515
You should add slash "/" at the beginning.

I don't know if you enabled Pretty URL.

But if you do, you must add slash.