E-mailing form contents

Permalink
I created a form and setup my e-mail address to have the contents sent to me but never received anything. Is there something I have to enable?

tcsllc
 
frz replied on at Permalink Reply
frz
Your server might not have phpmail setup right, or your mail client might be dumping it to a spam folder..
tcsllc replied on at Permalink Reply
tcsllc
is there any logs I can look at to see whats going on within c5? I'm using lunarpages as my host.

it's not something I have to configure through c5 right? I thought it would be too easy to just enter in my e-mail address and have it work... Maybe I forgot to do something?
frz replied on at Permalink Reply
frz
we've built mail logs for a client install in the past, but i don't think it's been ported over to the current public version yet.. maybe andy will correct me..

one way to check this out would be to throw a simple phpmail call in a file on your server outside of c5 and see if /that/ works.. if so then you have a c5 config issue, if not, a host issue...
stick this in a file ending in php and hit it through the browser after you've changed the email to be your own:

<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('caffinated@example.com', 'My Subject', $message);
?>
matogertel replied on at Permalink Reply
matogertel
I found out that most shared hosting servers do not support php's "mail" function out of the box, because of spam and identity spoofing.
I use the phpmailer class in those cases and set it to send mail through smtp. Some hosting providers are happy with adding an obscure -f option to sendmail. None of these solutions is provided by c5 out of the box unfortunately.
I was wondering if you guys could add this to a future version of c5?
frz replied on at Permalink Reply
frz
those are great ideas. Can you post them as a feature request over here? that way we won't lose track of em...

http://www.concrete5.org/index.php?cID=653...
matogertel replied on at Permalink Reply
matogertel
Even better, I've included my extended MailHelper class :-)
See:
http://www.concrete5.org/index.php?cID=4498...
Inz replied on at Permalink Reply
I am using your extended MailHelper class but now my emails are empty. No variables are coming trough. Does anyone have an idea why so? From and subjects work fine.
Need help ASAP! Thanks!
matogertel replied on at Permalink Reply
matogertel
Looks like you need to modify a few lines in the core for this to work.
If you're using version 5.3.1.1, edit the file YOUR_WEBSITE/concrete/helpers/mail.php and replace lines 22 to 28 which look like this:
private $headers = array();
   private $to = array();
   private $from = array();
   private $data = array();
   private $subject = '';
   public $body = '';
   private $template;

With these lines:
protected $headers = array();
   protected $to = array();
   protected $from = array();
   protected $data = array();
   protected $subject = '';
   public $body = '';
   protected $template;

Basically you need to replace the word "private" with the word "protected" (but only on those lines). I thought my helper would get around that problem, but looks like you still need to do it.
Inz replied on at Permalink Reply
I found the glitch. It wasn't your extensions fault. It works fine. Problem was in smtp server. Thanks anyway!
Inz replied on at Permalink Reply
Now i think it's the helper script. You can specify multiple emails in form setup. (where the submissions goes) and when i input 2 or more emails, the aren't coming through anymore. I can't find a reason to this on my own. Help needed. :)
Tony replied on at Permalink Reply
Tony
I don't think the form block was built to handle multiple recipient emails. if you need this, you should submit it as a feature request.
Inz replied on at Permalink Reply
5.3.x has this feature. Below the address field is written (separate multiple addresses with comma)
Tony replied on at Permalink Reply
Tony
cool, I wasn't aware that was added.
tcsllc replied on at Permalink Reply
tcsllc
I uploaded that test and went to it in my browser and received an e-mail in my inbox. So what does that mean... It should work right?