webForumDet fria alternativet

RFC 2822 kompatibel formmail

3 svar · 830 visningar · startad av maweer

maweerMedlem sedan juli 2012123 inlägg
#1

Hejsan!

Går det att göra något åt denna koden så att den blir RFC 2822 och RFC 5322 kompatibel. Vore jätte tacksam för hjälp, då jag inte fattar ett skvatt om vad som skall göras :)

$to = "<mail_1@blabla.com>, <mail_2@blabla.com>, <mail_3@blabla.com>, <mail_4@blabla.com>, <mail_5@blabla.com>, <mail_6@blabla.com>";
$subject = $_POST['plats'] . ' ' . $_POST['datum'] . ': Ny Spelning - Sidan uppdaterad';
$message1="Ny spelning: $_POST[plats], $_POST[datum]<br>http://xxxxxxxxxx.se/xxxxxx/form.php<p><u>Kan du?</u><br>Sätt en bock i kryssrutan och tryck på Spara<p><u>Kan du inte?</u><br>Tryck på ditt namn, så att det blir rött";
$from = "postmaster@xxxxxxxxxx.se";
$headers .= "Reply-To: $visitor_email \r\n";
$headers = "From:" . $from;

$headers  = "MIME-Version: 1.0\r\n"; 
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
$headers .= "From: Mitt Namn <$from>\r\n";
$headers .= "From:" . $from; 

     
     
$header1 ="<html>\r\n"; 
$header1 .="<head>\r\n"; 
$header1 .="<title>".$subject."</title>\r\n"; 
$header1 .="<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\r\n"; 
$header1 .="</head>\r\n"; 
$header1 .="<body class=\"body\">\r\n"; 
 

$footer1 = "<p><font face='Tahoma' size='3'><b>Eva and the Adams</b><br><font face='Tahoma' size='2'>Texten till footer<br><i><a href='http://xxxxxxx.info/'>www.xxxxxxx.info</a></i></p>"; 
$footer1 .= "</body></html>"; 

$text = strip_tags($_POST['text']); 
$text = eregi_replace("\r\n", "<br>", $_POST['text'] ); 

$message = $header1; 
$message .= $message1; 
$message .= $footer1; 

mail($to, $subject, $message, $headers);
grennfoxMedlem sedan feb. 2010177 inlägg
#2

Kanske är helt ute och cyklar nu, men kan du inte byta ut:

$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

till

$headers .= "Content-type: text/html; charset=rfc-2822\r\n";

Kanske tänker fel men tycker att det borde fungera då :P

maweerMedlem sedan juli 2012123 inlägg
#3

Tyvärr, det blev samma elände ;)

<mail1@gmail.com>: host gmail-smtp-in.l.google.com said:
Our system has detected that this message RFC 2822 compliant. To reduce the amount of spam sent to Gmai this message has been blocked. Please review RFC 2822 specifications for more information. 46si17671041eem.235 - gsmtp (in reply to end of DATA command)

<mail2@hotmail.com>: host mx2.hotmail.com said: (COL0-MC5-F3) Message could not be delivered. Please ensure the message is RFC 5322 compliant. (in reply to end of DATA command)

<mail3@xxxxxxxx.se>: host mail1.xxxxxxxxx.se said: Missing purported responsible address (in reply to end of DATA command)
maweerMedlem sedan juli 2012123 inlägg
#4

Jag tror minsann jag kom på det själv :)

Jag hade råkat få tre stycken

$headers = "From:" . $from;

Tack för att du tog dig tid grennfox

130 ms totalt · 3 externa anrop · v20260731065814-full.30151723
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
128 ms — hämta tråd, inlägg och bilagor (db)