-
☆ A M B ☆
- 24,524 Posts
Try it this way:
$username = $hook->getValue('username');
mail('me@mydomain','result',"user=$username");
-
☆ A M B ☆
- 24,524 Posts
er... not really sure. At the moment my eyes are too blurry to be able to see it all that well. I just find that trying to jam too much functionality into one line often leads to trouble, maybe because half the time I can't see. Likewise with sql queries - although the Revo way, of course, it to use proper xPDO syntax, no more strings of SQL to get tangled up in. As in the demo version you posted for mail. Your version may be two lines (or one, if you could figure out what the problem with the message parameter is), but not of much use on a server without mail() enabled. Above all, MODx strives for extensibility and portability. Probably not necessary in your case, but a good thing to keep in mind. I definitely need to get off the computer for a while. Good luck!