Toon posts:

[PHP] Kan geen mail sturen

Pagina: 1
Acties:
  • 57 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik wil met php script een mailtje sturen via smtp. dit lukt niet.
Heb ik een standaard scripje gepakt om te testen:

<?
$email = "mijn@zonnet.nl";
$headers = "From: bla <bla@zonnet.nl>\r\n";
$subject = "Testing";
$body = "test\ntest";

if(mail($email, $subject, $body, $headers))
{
echo("Send");
} else
{
echo("error");
}
?>

De instellingen in php.in zijn:

[mail function]
; For Win32 only.
SMTP = smtp.zonnet.nl
smtp_port = 25
sendmail_from = mijn@zonnet.nl

Nu krijg in elke keer de volgende error:

Warning: mail(): SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in c:\inetpub\wwwroot\test.php on line 7
error

Ik gebruik iis met php.

Weet iemand waar het aan kan liggen?

  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 19:24

gorgi_19

Kruimeltjes zijn weer op :9

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • mindcrash
  • Registratie: April 2002
  • Laatst online: 22-11-2019

mindcrash

Rebellious Monkey

Bare LFs in SMTP

Most likely you're here because your mailer displayed the pointer ``See http://pobox.com/~djb/docs/smtplf.html.''
Where did that pointer come from?
It was generated by qmail, an Internet message transfer agent. Your mailer tried to send an e-mail message to a server running qmail. Unfortunately, qmail spotted a problem: your mailer sent a bare LF.
Why should I worry about bare LFs?
You can't get mail through to msn.com and thousands of other systems around the Internet. Your mailer is violating 822bis section 2.3, which specifically prohibits all bare LFs.

How can my mailer be fixed?

That depends on what software you're using.
Solaris 2.5 sendmail: Upgrade! Fixed in Solaris 2.5.1. You can fix the problem by putting ``,E=\r\n'' at the end of Mether, Mtcp, or Msmtp in sendmail.cf. (Note that Mether is not the same as DMether.)

What is a bare LF, anyway?
It is an ASCII linefeed (LF) character not preceded by an ASCII carriage-return (CR) character.
Every line in an Internet mail message is required to end with CR LF. The entire message ends with CR LF dot CR LF. 822bis specifically prohibits other uses of LF.


The mail clients discussed above are incorrectly ending lines with LF and, in most cases, ending the entire message with LF dot LF. That's not CR LF dot CR LF, so a server such as msn.com will sit there waiting for the rest of the message. After a while it'll give up and drop the connection. Your mail doesn't get through.[/i]

Some mail servers convert a bare LF into CR LF, and accept LF dot LF as the end of a mail message. This behavior is specifically prohibited by 821bis.
hint hint :z

Kijk trouwens inderdaad ook eens naar de topic die gorgi hierboven noemt.

[ Voor 37% gewijzigd door mindcrash op 15-09-2004 10:38 ]

"The people who are crazy enough to think they could change the world, are the ones who do." -- Steve Jobs (1955-2011) , Aaron Swartz (1986-2013)


  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 19:24

gorgi_19

Kruimeltjes zijn weer op :9

Het lijkt er trouwens op dat zonnet wat vreemds heeft met z'n sendmail configuratie :) Echter, dat andere topic is voor zover ik weet 100% identiek :) Daarom doe ik deze op slot; als je nog vragen hebt, kan je die in dat andere topic stellen :) Zo blijft het een beetje centraal :)

Digitaal onderwijsmateriaal, leermateriaal voor hbo


Dit topic is gesloten.