Known problems with Mail_mime that cause empty lines at some e-mail providers?

StackOverflow https://stackoverflow.com/questions/22483372

  •  16-06-2023
  •  | 
  •  

Pergunta

I'm sending a PDF and a short text message with Mail_mime 1.8.8 (+ Mail 1.2.0). Almost every test is without a problem. Including GMail and Apple iCloud.

But it seems some recipients have trouble reading the attachment. Users of United Internet (1&1 and GMX) get empty lines between all the lines in the body.

As it's a multipart/mixed e-mail with headers in the body, the attachment is broken.

Is there a known problem with the e-mails generated with Mail_mime that could cause that? Regardless if the e-mail provider is using software that ignores the principles of Jon Postel to be tolerant with the data it receives?

Foi útil?

Solução

PEAR packages Mail and Mail_mime don't work together without tweaking the parameters to Mail_mime: http://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php

You need to set EOL to a single linefeed.

Outras dicas

check your syntax (Multipart Content-Type, MIME) & structures of header and body:

as described in RFC822 RFC2045 RFC2046

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top