in reply to mail with users names
What have you done to try and debug it?
My starting point would be to test it outside of the CGI environment: it is far easier to debug things that way.
I note that you have a function called sendmail, and you also import a function called sendmail, and you call sendmail(...) inside your sendmail function. Your own defined function will override the imported one, so this will lock you into infinite recursion on your own function. In a command-line environment you'd see a warning from defining a function with the same name; I suspect that in your CGI environment it is trying to show you those warnings, but it's saving them up to send to the browser and due to the infinite loop never getting to the point it actually sends them.
If your sendmail function took its inputs as arguments, and verified them, you might also have had a chance to spot something was wrong and bail out: that's a benefit of using better design.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mail with users names
by frank1 (Monk) on Jan 01, 2024 at 17:44 UTC | |
by Corion (Patriarch) on Jan 01, 2024 at 19:56 UTC | |
| |
by marto (Cardinal) on Jan 02, 2024 at 10:29 UTC | |
by Bod (Parson) on Jan 01, 2024 at 23:04 UTC |