The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
#13
Ok. So this is a standalone page. I didn't run a query to find the user (the $thatUser) query, so if you want to test it, just go in on line 39 and put a real "to" email address there.

http://pastebin.com/ukxgegtx

A few things I changed...
For your errors I changed from
Code:
if !$errName
to
Code:
if (!isset($errName)
to stop it from throwing errors.

Also, the form was throwing errors if there was no input on it, so I made the value and the errors only be able to show up if the form had already been posted...
Code:
value="<?php if($_POST){echo htmlspecialchars($_POST['name']);} ?>">
Code:
<?php if($_POST){echo "<p class='text-danger'>$errName</p>";}?>

Finally, I changed the email function from mail to email to use the built in userspice one.

Again, if you cannot send an email from the test page, you're not going to be able to send one here.

I hope that helps!
  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: 1 Guest(s)