I'm having a weird and frustrating problem. With identical code, I can send mail from one of my apps but not another. Here's /var/log/mail.log for the e-mail that works:

Nov  9 17:12:23 gob sm-mta[6693]: oA9MCN6H006693: from=<no-reply@galapagosmarketing.com>, size=612, class=0, nrcpts=1, msgid=<1289340743.4cd9c747240fa@coupon.dev.galapagos.office>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
Nov  9 17:12:24 gob sm-mta[6695]: oA9MCN6H006693: to=<jason.swett@gmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120612, relay=gmail-smtp-in.l.google.com. [74.125.95.27], dsn=2.0.0, stat=Sent (OK 1289340744 ga18si18104172ibb.16)

And here's the log for the one that doesn't work:

Nov  9 17:13:03 gob sm-mta[6704]: oA9MD3dp006704: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-v4

Same machine, same code (at least for the e-mail sending part). I can't figure out why one works and the other one doesn't.

(P.S. There's some overlap, but I figure this is more of a sysadmin question that a programming question, plus the person who knows the answer is more likely to be here than at Stack Overflow.)

link|improve this question

feedback

1 Answer

Step back from the computer and take a break for 5 to 10 minutes. Come back and "make clean" / rebuild the second application, if it is a compiled one. If it is an interpreted one change the first print statement to print back at you something "welcome back from your break". I think you will find out that the code that gets executed is not what you edit / compile / think that is executed.

(BTW, it would have been more helpful if you stated whether your applications are (shell) scripts, compiled executables and how are you trying to send email: by connecting to port 25 of the mail server, by forking /bin/mail, etc.).

link|improve this answer
It's a PHP script and I'm sending the mail with Swift mailer. – Jason Swett Nov 10 '10 at 13:31
feedback

Your Answer

 
or
required, but never shown

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