Enabling Email

Permalink
I know this is probably an easy question but how do I enable email so that when someone submits a form or forgets their password it sends an email. Nothing happens as of now.

Thanks,

 
stopha6 replied on at Permalink Reply
what kind of server are you running?
tsidell replied on at Permalink Reply
Linux
jgarcia replied on at Permalink Reply
jgarcia
I would run a simple test script to make sure that it's not just some sort of server issue
<?php
mail('you@yourdomain.com','Test Message','Test');
?>
tsidell replied on at Permalink Reply
that script sends out an email
jgarcia replied on at Permalink Reply
jgarcia
did you check your spam box?
tsidell replied on at Permalink Reply
The email is not in the spam box. Is there some option in Concrete to enable email. Because it seems my server is configured to send email but when i click on Forgot Password no email gets sent.
ryan replied on at Permalink Reply
ryan
Check and see if the mail function returns true or false.

<?php
$res = mail('you@yourdomain.com','test','test message');
echo var_dump($res);


Another common problem is if yourdomain.com is setup on that server, but the mail is hosted elsewhere then the server won't send it out because it's attempting to deliver it locally.
tsidell replied on at Permalink Reply
I ran the script. It came back true. Also the domain is setup on the same server as the mail.
tsidell replied on at Permalink Reply
is there a file in the concete folder that I edit to set up sending emails from this email account
jgarcia replied on at Permalink Reply
jgarcia
you shouldn't have to enable e-mails in c5. are you sure you specified the correct e-mail address when you setup your site?
tsidell replied on at Permalink Reply
it didnt ask me for an email when I set up Concrete 5 install.
frz replied on at Permalink Reply
frz
is it possible your website and email are hosted different places? if this is the case and your webserver hasn't got explicit MX records set it will think it is handling email for itself... so messages go out to other domains, but to machinename.com it thinks it IS the email server for it even if it isn't.
jgarcia replied on at Permalink Reply
jgarcia
someone correct me if i am wrong, but i'm pretty sure c5 asks for an e-mail address during the setup process, right?
robier replied on at Permalink Reply
Not sure if anyone got this to work but I'm researching the use of Google Apps(mail). I have several clients that don't use their standard web host's email server anymore and if there is a way for Concrete5 to allow us to set those parameters manually, I think it would go a long way to helping businesses. I see where C5 has external server setup but does not allow for the selection of TLS, SSL, etc. which is required by Google/Gmail. Any thoughts?
ryan replied on at Permalink Reply
ryan
1) Run that test script, send an email as simple as possible without c5 involved.
Does it work?
- Yes -step 5
- No - step 2.

2) Try a different email address, hotmail, gmail etc..
Did that work?
- Yes - step 6
- No - step 3.

3) Ok, it's definitely a server problem - check out your log files /var/log/maillog
Can you see your messages & errors in there?
- Yes - post your q's in a linux forum
- No - step 4

4) Checkout sendmail_path in php.ini, make sure sendmail is running, path is correct etc..

5) Ok, so mail is working on the box, let's check out the c5 stuff. Dashboard Sitewide settings -> Log emails sent [checked]
Test again & make sure emails show up there. Then on a single page or in your theme print this out:
<?php
echo var_dump(ENABLE_EMAILS);
?>

This wouldn't be false unless it was specifically set. If it's false, define it as true in your config/site.php

6) Ok, so your server is routing mail for your domain in a way that you wouldn't expect. Check your local mailbox on that server, see if the messages are there - then move to a linux forum to get your mail routing figured out..


Hope that gets you a bit farther, let us know what the problem was when you've got it figured out.
Ryan
jiinus replied on at Permalink Reply
jiinus
I don't know if this is your bug exactly, but by default C5 installation sends some of the emails with a hard-coded address "info@concrete5.org", and the messages may then be identified as spam. (unless the server you're running is at concrete5.org, I assume it's not ;) )

I fixed this on my installation by adding

define('SITE_ADMIN_EMAIL', 'admin@mysite.com');

to config/site.php, and then did a search/replace for all files with

"info@concrete5.org" => SITE_ADMIN_EMAIL