Jump to content

Recommended Posts

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? 

Link to comment
https://forums.phpfreaks.com/topic/237010-send-mail-malforming-message/
Share on other sites

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);

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.