How to make my forms email the data to an email address

Permalink
Hi There

I have inherited a website which is built on this platform.

The website has many contact forms but they do not seem to relay the data capture to an inbox.
I can see the data is sent to the CMS database which I can access from the dashboard so it is definitely being captured. But ideally this information needs to be delivered to an email address.

One of the fields in the form has an input field called notification email. But this just seems redundant i.e. no data is sent.

Can anyone help?
Thanks in advance

 
PMorrison replied on at Permalink Reply
...
PMorrison replied on at Permalink Reply
...
PMorrison replied on at Permalink Reply
...
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Possibly a Captcha that is preventing the email from being sent?
PMorrison replied on at Permalink Reply
Hi Weyboat - thank you for replying so swiftly.
Are u saying if I choose to include a captcha (as is currently optional in the edit setup) this thing might actually fire off the email?

Its worth a shot anyway. I'll give it a go..
PMorrison replied on at Permalink Reply
I have included captcha feature but the email notification still does not get sent (or received).

Is it possible that when the site built the mail server wasn't configurated??
Which files do I need to look at in order to establish the mail method?
This way I can check with the SOC Networks team, if it has been configured.

Thanks in advance..
PMorrison replied on at Permalink Reply
Or can anyone tell me where I will find the mail script in the site hierarchy, so I can check for its existence..
PMorrison replied on at Permalink Reply
ok so I have found a file contact.php which is inside httpdocs>packages>tools folder

The form has only a class and a name. It does not have an action, nor does it have a method..

So am I correct in assuming that concrete 5 is not set up to email the results to an inbox???
Cahueya replied on at Permalink Reply
The receiving Email can be set directly in the "Options" tab of the Form Block (if it is the core form block) and in you dashboard>settings>e-mail method you can define the SMTP server credentials that should be used to send things out. Might be that somethings going wrong there.

Does the site send out emails at all? like forgot password mails and such?
PMorrison replied on at Permalink Reply
Hi Cahueya

No the site no longer sends email, not even forgotten password etc

In dashboard email settings>SMTP Method

There are two options

I) Default PHP Mail Function [which is checked]
ii) External SMTP Server
Cahueya replied on at Permalink Reply
Ok, so either the PHP mailer does not send out (is it active?) or it sends out and ends up in spam somewhere (but then it would be in the logs)

Can you try putting the credentials of a known working SMTP Server into the config and see if it sends then?
PMorrison replied on at Permalink Reply
Thanks Cahueya

Yeh think the php mailer function does its job. They get logged and the data is captured in the db. But somewhere along the line the mails stopped coming in.

I'm just looking through 4 years of historical correspondence and I now know for sure that emails used to get sent and received. During that time however the website has resided on different servers.
So, I'm left to think that the stmp mail server is no longer in place on the same (web) server as in dashboard>STMP method the default php mail script is checked. Does this not indicate that the mail server, when it worked, was local??
Cahueya replied on at Permalink Reply
Ok, please check via FTP what the settings are in your /config/site.php

It might be that the base_url that is set or the IP or whatever has changed and therefore the phpmailer refuses its work - BUT this should be logged somewhere in the error logs...

If you just switch over to the SMTP method and enter valid credentials of a working server (where there should be a SPF record for your domain to use that mailserver) - the mailings should work.

Anyway - php mailings are way easier considered "spam" by many blocklists, so using the SMTP method is better.
PMorrison replied on at Permalink Reply
Hi Cahueya

If there was (or should be) stmp mailserver set up, would these details be in the site.php config file?? Only I cant see any evidence of one in site.php
PMorrison replied on at Permalink Reply
Or could that be expected with the stmp server was on the same server as the website?
Again I think this was the most probable setup initially (all them years ago).
Cahueya replied on at Permalink Reply
No, that is all in dashboard > SMTP method once you activate it.

in site.php there might be settings regarding the URL or IP adress that could interfere.
Cahueya replied on at Permalink Reply
ok, even if the SMTP server sits on the same server as the webserver - it would not be able to do anything without the correct credentials set up in systems>smtp method as it couldn't even log in to the smtp server with an account.

If the php mailing method was activated, there is no need for a separate SMTP server, the php script just behaves "as if" it was a mailing server which is why php mailing is easily considered as not being trustworthy.

Please just try setting up a smtp account there and you will quickly see if it works.
PMorrison replied on at Permalink Reply
ok so setup the stmp on the same server if I leave the default method checked.

And if the smtp is set up on a different server then choose external smtp method in dashboard?
PMorrison replied on at Permalink Reply
Right ok.
So if this is managed by the stmp method in dashboard, and the method is set to the default php internal mail script - which I am assuming it always has been this way..
Does this mean the stmp would have been originally setup on the same server ie was local?

Am I right in thinking that php mail still using stmp??
Cahueya replied on at Permalink Reply
It means, that either:

1. in the past, mailing with php worked fine, which is always "local". If the hosting environment has changed somewhere over time, it might just be that this function is no more available in the new environment.

2. It was always using a working SMTP and someone switched the configuration to PHP
PMorrison replied on at Permalink Reply
Ok perfect.
Thanks for clearing that up.
Really appreciate your guidance.
Many Thanks
Cahueya replied on at Permalink Reply
no, the php method just says "Send a mail from this sending adress" by php. I never use this on public sites - always SMTP.
PMorrison replied on at Permalink Reply
Great, thanks for clearing that up too.
Much appreciated.
PMorrison replied on at Permalink Reply
Hi - So an SMTP server was setup..
And i have entered the details in the dashboard..
Still having the same issue however i.e. emails not being received.

When i look at the logs i find this might be interesting

12:03:07 PM sent_emails paulmorrison
**EMAILS ARE ENABLED. THIS EMAIL WAS SENT TO mail()**

12:03:07 PM exceptions paulmorrison

Mail Exception Occurred. Unable to send mail: Connection timed out
#0 /var/www/vhosts/uk.domain.com/httpdocs/concrete/libraries/3rdparty/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('tcp://10.128.6....')
#1 /var/www/vhosts/uk.domain.com/httpdocs/concrete/libraries/3rdparty/Zend/Mail/Transport/Smtp.php(199): Zend_Mail_Protocol_Smtp->connect()
#2 /var/www/vhosts/uk.domain.com/httpdocs/concrete/libraries/3rdparty/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#3 /var/www/vhosts/uk.domain.com/httpdocs/concrete/libraries/3rdparty/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /var/www/vhosts/uk.domain.com/httpdocs/helpers/mail.php(64): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#5 /var/www/vhosts/uk.domain.com/httpdocs/packages/kelway_forms/helpers/util.php(79): MailHelper->sendMail()
#6 /var/www/vhosts/uk.domain.com/httpdocs/packages/kelway_forms/tools/save_contact.php(51): KelwayFormsUtilHelper->sendEmailNotifications('3578', 'Contact', Array, 'kelway')
#7 /var/www/vhosts/uk.domain.com/httpdocs/concrete/startup/tools.php(29): include('/var/www/vhosts...')
#8 /var/www/vhosts/uk.domain.com/httpdocs/concrete/dispatcher.php(146): require('/var/www/vhosts...')
#9 /var/www/vhosts/uk.domain.com/httpdocs/index.php(5): require('/var/www/vhosts...')
#10 {main}
PMorrison replied on at Permalink Reply
In the smtp.php file

$host = ‘127.0.0.1'

i don't recognise the IP - what is that??

Is it something Zend uses? Please help..