edwind Posted May 20, 2011 Share Posted May 20, 2011 Hi, I'm using an excellent script for a guestbook but when I get a notification that someone has signed in the message I get has an error report. The code looks OK to me but there must be something amiss. Here's the code snippet that notifies of a post if (strtoupper($notify) == "YES") { $msgtitle = "Someone signed your guestbook"; $vcomment = str_replace(""","\"",$vcomment); $vcomment = stripslashes($vcomment); $vcomment = str_replace("<br>","\n",$vcomment); $msgcontent = "Local time : $tgl\n\nThe addition from $vname :\n----------------------------\n\n$vcomment\n\n-----End Message-----"; @mail($admin_email,$msgtitle,$msgcontent,"From: $vemail\n"); } [/codr] The error report says.. [error] XML Parsing Error: not well-formed Location: http://webmail.whatapicture.biz/mewebmail/HooDoo/Servlet/request.aspx?Cmd=GET-MESSAGE&Browser=2&Folder=%2FInbox&ID=3B207097F31F4D1299310AD0591EA8D7.MAI&BODY=0&DT=1305930258851 Line Number 1, Column 284:<BASEELEMENT SCHEMA="MESSAGE" METHOD="GET-MESSAGE"><ELEMENT ID="3B207097F31F4D1299310AD0591EA8D7.MAI"><FOLDER><![CDATA[\Inbox]]></FOLDER><TO><![CDATA[[email protected]]]></TO><SUBJECT><![CDATA[someone signed your guestbook]]></SUBJECT><RECEIVED>Fri, 20 May 2011 16:52:15 0000</RECEIVED><ATTACHMENTS EXISTS="0"></ATTACHMENTS></ELEMENT><RETURNVALUE>1</RETURNVALUE></BASEELEMENT> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ [/error] Can anyone help please? Quote Link to comment https://forums.phpfreaks.com/topic/237010-send-mail-malforming-message/ Share on other sites More sharing options...
Drummin Posted May 20, 2011 Share Posted May 20, 2011 Not sure about using @mail(). I've been using mail() and I have headers. $headers = "From: $siteemail\r\n"; $headers .= "Reply-To: $siteemail\r\n"; $headers .= "Organization: $adminname \r\n"; $headers .= "X-Sender: $siteemail \r\n"; $headers .= "X-Priority: 3 \r\n"; $headers .= "X-Mailer: php\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; mail($mail_to, $mail_subject, $mail_body, $headers); Quote Link to comment https://forums.phpfreaks.com/topic/237010-send-mail-malforming-message/#findComment-1218275 Share on other sites More sharing options...
edwind Posted May 21, 2011 Author Share Posted May 21, 2011 Thanks for the suggestion Drummin. I tried your fix but it makes no difference at all so I'll leave it in place. I still get an email but it also still invokes a new window with the error report. So I'm still looking for help. Quote Link to comment https://forums.phpfreaks.com/topic/237010-send-mail-malforming-message/#findComment-1218335 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.