Author Topic: Failed to send message - Copy or BCC  (Read 11133 times)

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« on: July 29, 2010, 02:29:04 PM »
trunk-r3836

I get the "Failed to send message" error when I add a recipient to the Copy and/or BBC field when I compose and send a message.

Sends email OK if only recipient field is filled in.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Failed to send message - Copy or BCC
« Reply #1 on: July 29, 2010, 02:49:57 PM »
What is in your error log?

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #2 on: July 29, 2010, 03:00:51 PM »
Here is the entry in the error log:
Code: [Select]
[29-Jul-2010 14:56:02] PHP Warning:  mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 Unknown user in C:\folder\mail.mysite.com\program\steps\mail\func.inc on line 1437

This is line 1437 of func.inc:
Code: [Select]
$sent = mail($to, $subject, $msg_body, $header_str, "-f$from");
« Last Edit: July 29, 2010, 03:08:44 PM by jeffshead »

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #3 on: July 29, 2010, 03:13:23 PM »
When I look in my email server log, I see the following:

Code: [Select]

&quot;SMTPD&quot; 3452 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: RCPT TO:<Webmaster <webmaster@mysite.com>>&quot;
&quot;SMTPD&quot; 3452 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;SENT: 550 Unknown user&quot;
&quot;SMTPD&quot; 3436 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: QUIT&quot;
&quot;SMTPD&quot; 3436 43270 &quot;2010-07-29 14:55:44.171&quot; &quot;127.0.0.1&quot; &quot;SENT: 221 goodbye&quot;
&quot;SMTPD&quot; 3428 43298 &quot;2010-07-29 15:07:34.421&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: RCPT TO:<<webmaster@mysite.com>>&quot;
&quot;SMTPD&quot; 3428 43298 &quot;2010-07-29 15:07:34.421&quot; &quot;127.0.0.1&quot; &quot;SENT: 550 Unknown user&quot;
&quot;SMTPD&quot; 3416 43298 &quot;2010-07-29 15:07:34.421&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: QUIT&quot;


Notice the double << and >>

Could that be the issue? Maybe RC needs to strip some things from the Copy and BCC email addresses to achieve the proper format so the email server can handle the addresses.
« Last Edit: July 29, 2010, 03:18:30 PM by jeffshead »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Failed to send message - Copy or BCC
« Reply #4 on: July 29, 2010, 03:27:43 PM »
Not sure but it seem to be a mail server problem, the SVN is working fine for me.

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #5 on: July 29, 2010, 03:51:16 PM »
I'm using hMailServer 5.3.2-B1769.

I just reverted back to RC 0.4Beta and I get the same results.

If I use Outlook 2007 (desktop) to send messages using the CC and BCC fields, it works.

Anyone else run into this?
« Last Edit: July 29, 2010, 04:15:41 PM by jeffshead »

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #6 on: July 29, 2010, 04:40:33 PM »
I just made a temporary swith from hMailServer to ISMail EP and get the same results.

I don't think this is a server issue.

Here is a line from the ISMail server log:
Code: [Select]
2010-07-29 16:37:38 <TRACE-2>: SmtpReceiver: 0002: Problem extracting an address from the string '<Webmaster <webmaster@mysite.com>>':

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #7 on: July 29, 2010, 05:48:50 PM »
Switched back to hMailServer and also find this is the awstats log:

Code: [Select]
2010-07-29 17:38:48 sendmail@mysite.com Webmasterwebmaster@mysite.com 127.0.0.1 127.0.0.1 SMTP ? 550 0

Notice "Webmasterwebmaster@mysite.com"

Should be webmaster@mysite.com

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #8 on: July 29, 2010, 07:52:40 PM »
I did some more testing.

I disabled all plug-ins and get the same results.

If I let RC populate the Recipient and Copy fields (as pictured below), I get the following in my hMailServer logs:


Code: [Select]
&quot;SMTPD&quot; 13284 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 220 mysite.com ESMTP&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: HELO No2&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 250 Hello.&quot;
&quot;SMTPD&quot; 13284 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: MAIL FROM:<php@mysite.com>&quot;
&quot;SMTPD&quot; 13284 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 250 OK&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: RCPT TO:<me@mysite.com>&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 250 OK&quot;
&quot;SMTPD&quot; 13996 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; [COLOR=Red]&quot;RECEIVED: RCPT TO:<Postmaster <postmaster@mysite.com>>&quot;[/COLOR]
&quot;SMTPD&quot; 13996 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 550 Unknown user&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;RECEIVED: QUIT&quot;
&quot;SMTPD&quot; 11116 824 &quot;2010-07-29 19:01:52.218&quot; &quot;127.0.0.1&quot; &quot;SENT: 221 goodbye&quot;

("RECEIVED: RCPT TO:>" should be: "RECEIVED: RCPT TO")

and

Code: [Select]
2010-07-29 19:01:52 php@mysite.com Postmasterpostmaster@mysite.com 127.0.0.1 127.0.0.1 SMTP ? 550 0


If I manually enter addresses in the Recipient and Copy fields (as pictured below), I get the following in my hMailServer logs:


Code: [Select]
"SMTPD" 13284 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "SENT: 220 mysite.com ESMTP"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "RECEIVED: HELO No2"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "SENT: 250 Hello."
"SMTPD" 13284 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "RECEIVED: MAIL FROM:"
"SMTPD" 13284 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.609" "127.0.0.1" "RECEIVED: RCPT TO:"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "SENT: 250 OK"
"SMTPD" 14136 1007 "2010-07-29 19:47:04.625" "127.0.0.1" [COLOR=red]"RECEIVED: RCPT TO:<>"[/COLOR]
"SMTPD" 14136 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "SENT: 550 Unknown user"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "RECEIVED: QUIT"
"SMTPD" 13960 1007 "2010-07-29 19:47:04.625" "127.0.0.1" "SENT: 221 goodbye"

("RECEIVED: RCPT TO:<>" should be: "RECEIVED: RCPT TO:")

and

Code: [Select]
2010-07-29 19:47:04 php@mysite.com postmaster@mysite.com 127.0.0.1 127.0.0.1 SMTP ? 550 0


Please notice how the email addresses are formated in the logs. The address in the Recipient field is always formatted correctly no matter if RC populates the field or if it's entered manually. The email address in the Copy field gets formatted differently but is never in a format that enables the email server to extract a usable address.
« Last Edit: July 29, 2010, 08:05:40 PM by jeffshead »

Offline jeffshead

  • Full Member
  • ***
  • Posts: 71
Failed to send message - Copy or BCC
« Reply #9 on: July 29, 2010, 10:57:44 PM »
I switched from PHP mail() to SMTP and do not encounter this problem.

Anyone have any ideas as to why this occurs with PHP mail() funtion but not SMTP?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Failed to send message - Copy or BCC
« Reply #10 on: July 30, 2010, 11:09:04 AM »
It may be a DNS problem of some kind, can you turn on more debugging logs on the mail server?