| Project: | Simplenews |
| Version: | 6.x-1.0-rc6 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi,
I ran into an issue that I don't how to fix.
I can send/ receive newsletters and everything seems to work fine but when I try to forward the message (generated by simplenews), I can't... I get the following error:
"Task 'admin@mywebsite.com - Sending' reported error (0x800CCC6A) : 'Your outgoing (SMTP) e-mail server has reported an internal error. If you continue to receive this message, contact your server administrator or Internet service provider (ISP). The server responded: 451 See http://pobox.com/~djb/docs/smtplf.html.'"Here are some specs:
VERSION / MODULES (in question)
--------------------------------
- D6.14
- Simplenews 6.x-1.0-rc6
- Simplenews on register 6.x-1.0
- Mime Mail 6.x-1.x-dev
I tried the following modification in the file /includes/mail.inc with no success...
return mail(
$message['to'],
mime_header_encode($message['subject']),
// Note: e-mail uses CRLF for line-endings, but PHP's API requires LF.
// They will appear correctly in the actual e-mail that is sent.
str_replace("\r\n", '', $message['body']),
// For headers, PHP's API suggests that we use CRLF normally,
// but some MTAs incorrecly replace LF with CRLF. See #234403.
join("\r\n", $mimeheaders)
);EMAIL CLIENT
--------------------------------
- Outlook 2007
PHP VERSION
--------------------------------
- 5.1.6
Server
--------------------------------
- CentOS 5 with Plesk 8.6 (32-bit) -> Qmail
Any suggestion would be appreciated.
Thanks!
Comments
#1
Try to make sure your email message does not contain any \n except in the combination \r\n:
This strips _all_ \r and \n characters from the body:
str_replace("\r", '', str_replace("\n", '', $message['body']));Do the same thing with all headers.
If Drupal does not send out any bare LF's they must be added somewhere downstream. Have you contacted your host?
#2
Thank you! I've replaced all the \n with \r\n... in mail.inc which seems to be doing the job (partially)... at least now, when I try to forward the message, I can... I don't get the error message... however, the recipient of the forwarded message sees only a bunch of code instead of the actually text/images... i'm not sure if this is a problem with Outlook 2007... apparently, this version of outlook is a piece of .... when it comes to handling css.
I'll keep trying... thanks for pointing me in a direction!
#3
Here's my edited version of the mail.inc file... I know, I know... hacking the core is a big no no... but if I knew a better way to fix this I wouldn't do it...
#4
might be related to #239825: drupal_mail(), CRLF, and Windows
#5
No activity, closing the issue.