10378 Posts in 2194 Topics by 1710 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1159 Views |
-
Can PHP mail but silverstripe userforms will not mail

26 June 2010 at 12:21am Last edited: 26 June 2010 12:25am
Can php mail() and send mail from bash Shell
But userforms will not mail.
Where can I start to troubleshoot this?
2.4.0
-
Re: Can PHP mail but silverstripe userforms will not mail

26 June 2010 at 1:06pm
UserForms uses the built in silverstripe Email class. You could setup a quick test using SilverStripe mail. If this works then its something in the module (like a configuration)
// mysite/code/Page.php
function TestEmail() {
$mail = new Email('from@domain.com', 'email@domain.com', "test", "test");
return $mail->send();
}Then include $TestEmail in your template.
Also check that you have a defined 'from' and 'to' address in your UserForms email tab. Some servers also require you to use a from address from a domain on the server.
-
Re: Can PHP mail but silverstripe userforms will not mail

29 June 2010 at 2:44am
Will,
Thanks for the troubleshooting direction.. That code worked flawlessly and sent an email when i visted the page.. I double checked the from and to and used the same from i used in that test and still nothing from userforms..
Mark-
-
Re: Can PHP mail but silverstripe userforms will not mail

29 June 2010 at 3:29am Last edited: 29 June 2010 8:52am
Arrrghhhh.. Hey man, sorry, just forget about this post.. been working too much i guess..
There is nothing wrong with the userforms module.. it was user idiot error..
although I had a to: address in the settings I inadvertently must have checked the: or use a field for the form, and had something random selected in there.. amazing how something so simple is not evident when you stare at it for too long..
Sorry to waste your time..;D
| 1159 Views | ||
|
Page:
1
|
Go to Top |


