1

I am using PHPMailer class to send mails. Some mails contain user input. Should I clean user input before inserting it to mail body? How to do this?

Tried to google for it but haven't fount anything useful.

2 Answers2

3

Yes, you should ALWAYS sanitize/clean user input to prevent code or SQL injections.

Steve Nguyen
  • 5,854
  • 5
  • 21
  • 39
0

Sanitation is always key when handling user input.

Michael Irigoyen
  • 22,513
  • 17
  • 89
  • 131