The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sending email to a user
#10
You didn't include your actual form...if you want to paste it on pastebin and give me the link that would probably help, but I can see a few things off the bat...

Code:
$from = $user->data()->email['email'];
should probably be...
Code:
$from = $user->data()->email;

Secondly, you may want to consider using
Code:
$name = Input::get('name');
instead of
Code:
$name = $_POST['name'];

It most likely wouldn't be a problem on sending emails, but that would sanitize the input in case someone was doing something mischievous. Do this especially if you plan on saving a copy of the sent message to the database.

You may not be able to do it for the email address. It's been a while since I've done that.

Either way, try fixing the
Code:
$from = $user->data()->email;

and see if it sends. If not, we can look a little farther.
  Reply


Messages In This Thread
sending email to a user - by LBC - 11-21-2016, 08:49 AM
sending email to a user - by mudmin - 11-21-2016, 04:54 PM
sending email to a user - by LBC - 11-21-2016, 05:21 PM
sending email to a user - by mudmin - 11-21-2016, 07:23 PM
sending email to a user - by plb - 11-22-2016, 05:32 AM
sending email to a user - by LBC - 11-22-2016, 06:52 AM
sending email to a user - by mudmin - 11-22-2016, 07:17 AM
sending email to a user - by LBC - 11-23-2016, 09:09 AM
sending email to a user - by mudmin - 11-24-2016, 04:20 PM
sending email to a user - by mudmin - 11-24-2016, 04:48 PM
sending email to a user - by LBC - 11-25-2016, 06:46 AM
sending email to a user - by mudmin - 11-25-2016, 01:55 PM
sending email to a user - by mudmin - 11-25-2016, 02:47 PM
sending email to a user - by LBC - 11-29-2016, 07:05 AM
sending email to a user - by LBC - 01-09-2017, 09:31 AM
sending email to a user - by LBC - 01-09-2017, 10:36 AM
sending email to a user - by LBC - 01-09-2017, 11:45 AM
sending email to a user - by mudmin - 01-11-2017, 12:28 AM

Forum Jump:


Users browsing this thread: 6 Guest(s)