Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to send mail using either the built-in PHP mail() function or through the phpmailer library, which of course relies on mail(). phpmailer says it "cannot instantiate the mail function" so I'm troubleshooting directly through mail(). I do have mail() working correctly elsewhere, but the address is internal (same domain as web server, also the mail server is on the same LAN as the web server) so I'm sure that's why the it works and my new function doesn't. Here's the error log (and no, icWALL is not a typo, that's exactly how it copy/pasted):

[17-Jul-2013 11:37:27] PHP Warning:  mail() [<a href='function.mail'>function.mail</a>]: Unable to send message to SMTP server. 5.5.1 Error: need RCPT command
icWALL (7.3.4.5721)

I'm thinking it's a SonicWALL config issue, but I've never heard of RCPT before. Is there a workaround in PHP, such as authenticating? Or do I need to have them change configs on the SonicWALL?

The system is an IBM iSeries running Apache (not sure the version), PHP 5.3.8, and Zend Server extensions. It is pretty similar to Linux as far as PHP is concerned, so go ahead and try to answer as if it were Linux if you have any idea.

share|improve this question
4  
I can't tell what your system's problem is based on the above (though I too suspect something to do with your PHP code, not your system configuration), but if you've never heard of RCPT you need to spend a little time learning the SMTP protocol (you should at least recognize the basic commands like HELO, MAIL, RCPT, and DATA). –  voretaq7 Jul 17 '13 at 17:34
    
I haven't ruled out anything yet, but through more generic searching on Google I found a similar case where the "to" address wasn't specified. I changed from using an address list to hardcoding my address, and this is what it did to my address according to the error log (assume username@mydomain.com) ername@mydomain.com&gt; Which is odd because it cropped SonicWALL to icWALL.... Where did the first few letters go? It's always cropping to 6, and then why add the &gt; at the end? –  MaKR Jul 17 '13 at 18:48
    
After hardcoding an address with that server's domain an email sent successfully, but using any other domain it won't work. I'm going to say it's very likely an authentication problem. –  MaKR Jul 17 '13 at 19:50

1 Answer 1

Fixed: the issue was the SonicWALL config. Only internal emails were allowed by firewall rules.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.