Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Can PHP mail but silverstripe userforms will not mail


4 Posts   1442 Views


26 June 2010 at 12:21am (Last edited: 26 June 2010 12:25am), Community Member, 7 Posts

Can php mail() and send mail from bash Shell

But userforms will not mail.

Where can I start to troubleshoot this?



26 June 2010 at 1:06pm Forum Moderator, 5511 Posts

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('', '', "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.


29 June 2010 at 2:44am Community Member, 7 Posts


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..



29 June 2010 at 3:29am (Last edited: 29 June 2010 8:52am), Community Member, 7 Posts

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