0

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.

MaKR
  • 111
  • 6
  • 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](http://www.cs.cf.ac.uk/Dave/PERL/node175.html) 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> 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 > 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 Answers1

0

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

MaKR
  • 111
  • 6