PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$to_email = "tomail@mail.com";
$to_name = "Dear Sir";
$from_name = "My Name";
$from_email = "mymail@mail.com";
$subject = $news_ex; // is a variable that has been posted
$message = $news; // is a variable that has been posted
$to = ""$to_name" <$to_email>";
$from = ""$from_name" <$from_email>";
$to = str_replace("\''", "'", $to);
$from = str_replace("\''", "'", $from);
$subject = str_replace("\''", "'", $subject);
$message = str_replace("\''", "'", $message);
mail($to, $subject, $message, "From: $from\nX-Mailer: System33r");
However in this code, sent mails are added with an unwanted header.
Is there any way to send an email without any header?? Or only information that I provide.
Received: from ї38.144.87.94] by hotmail.com (3.2) with ESMTP id MHotMailBEBD5BA700064004311B2690575EE16D0; Tue, 28 May 2002 16:20:08 -0700
Received: from nobody by host06.ipowerweb.com with local (Exim 3.35 #1)id 17CqG7-0007Y2-00for mymail@hotmail.com; Tue, 28 May 2002 16:20:07 -0700
From nobody@host06.ipowerweb.com Tue, 28 May 2002 16:20:29 -0700
Message-Id: <E17CqG7-0007Y2-00@host06.ipowerweb.com>
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - host06.ipowerweb.com
X-AntiAbuse: Original Domain - hotmail.com
X-AntiAbuse: Originator/Caller UID/GID - ї99 99] / ї99 99]
X-AntiAbuse: Sender Address Domain - host06.ipowerweb.com
Especially the part with "X-AntiAbuse......" are not needed by me.
Tough, it looks like the send mail thingy adds them by itself and there is no way around it, most people don't look at that much header information anyway.
Since it is added by the smtp-server, there is no way for you to get rid of it - would make no sense if.
As long as you are not spamming these lines shouldn't harm you