Page 1 of 1

mail function

Posted: Tue May 28, 2002 6:13 pm
by dethron
Hi all;

I use following code in my web side


Code: Select all

$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.

Thanx all...

Posted: Tue May 28, 2002 6:15 pm
by dethron
When I used

Code: Select all

mail($to, $subject, $message, "From: $from\n");
instead of

Code: Select all

mail($to, $subject, $message, "From: $from\nX-Mailer: System33r");

again, some header are added....

Posted: Tue May 28, 2002 6:16 pm
by mydimension
some headers can't be avoided. can you post the headers that are being sent so we can what it is you are trying to remove?

X-AntiAbuse......is my problem....

Posted: Tue May 28, 2002 6:25 pm
by dethron
When I used the second (without X-mailer...bla bla)
I get following unwanted part....

Code: Select all

Received: from &#1111;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 - &#1111;99 99] / &#1111;99 99] 
X-AntiAbuse: Sender Address Domain - host06.ipowerweb.com
Especially the part with "X-AntiAbuse......" are not needed by me.

Thanx all,

Posted: Wed May 29, 2002 3:57 am
by MattF
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.

Last five line

Posted: Wed May 29, 2002 6:21 am
by dethron
Yes you are right, most people do not interest in these headers. :)
However I wonder is there a way to remove the part with X:Abuse. :wink:

The only thing I get rid of is the last five lines. :twisted:

Thank you all. :oops:

Posted: Wed May 29, 2002 8:29 am
by volka
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