Jump to content

[SOLVED] why mail() error??


argan328

Recommended Posts

Can someone tell me why I'm getting the following error?

 

Warning: mail() expects parameter 3 to be string, array given in /home/content/x/x/x/xxxxxxx/html/guestbook/sign.php on line 314

 

here is the code:

 

                                          $to="[email protected]";
                                          $subject="Someone has signed the guestbook!!";
                                          $body="Hey, go take a look at the site because someone's left a guestbook entry!";
                                          $headers="From: [email protected]";

                                          mail($to, $subject, $body, $headers); //this is line 314  

 

Link to comment
https://forums.phpfreaks.com/topic/44073-solved-why-mail-error/
Share on other sites

the truth is I've been playing with it for a few hours now and shortly after I posted this question it stopped giving me the error.  I still have the same

$body="Hey, go take a look at the site because someone's left a guestbook entry!";

which is really weird but I did change a bunch of other stuff so I'm wondering if the problem wasn't really with that line of code.

 

although I'd like to know what was wrong the good news is it's solved (somehow!)

 

Thanks!

Argan

Link to comment
https://forums.phpfreaks.com/topic/44073-solved-why-mail-error/#findComment-214025
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.