1

I am developing some software using Ruby on Rails in Ubuntu. I added Ruby's native mailer library, but it isn't sending mails so I want to make sure that my OS is not prohibiting that.

How can I test the ability of my OS to send email?

I got this system output:

telnet mx0.gmx.com 25
Trying 74.208.5.90...
Connected to mx0.gmx.com.
Escape character is '^]'.
220 mx0.gmx.com GMX Mailservices ESMTP {mx-us011}
EHLO
250-mx0.gmx.com GMX Mailservices
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 SIZE
11
  • Any computer with a network connection can send mail (if your ISP allows it). Without knowing how Ruby's native mailer library works, it's fairly impossible to answer this question.
    – Hyppy
    May 26, 2011 at 17:03
  • @Hyppy I had in mind the case of maybe being behind a firewall, or having some other security restrictions, or installation quirks.
    – Genadinik
    May 26, 2011 at 17:05
  • 1
    telnet server.com 25 to a valid mail server ... at the prompt type "EHLO". If you get a response, you're good.
    – Hyppy
    May 26, 2011 at 17:06
  • @Hyppy I did this on my own system: "telnet localhost 25" and here is what I got: Trying ::1... Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused - what does that mean? Did I do something wrong?
    – Genadinik
    May 26, 2011 at 17:10
  • @Hyppy: make that an answer. May 26, 2011 at 17:10

1 Answer 1

4

Use the following command to connect to a valid mail server:

telnet server.com 25

At the prompt type "EHLO". If you get a response, you're good.

3
  • @Genadinik: the response you posted shows that your system can connect to an external mail server, so there's nothing on your system or between you and that external mail server that's stopping your mail. Therefore, it's a problem with your software. QED May 26, 2011 at 17:28
  • I'll vote up once the new day rolls around in UTC... May 26, 2011 at 17:28
  • He still could get his mail rejected after EHLO, e.g. if his server IP is blacklisted or something.
    – AlexD
    May 27, 2011 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .