Skip to main content

Using SMTP to send mail by logging into a mail account.

Comments

10 comments

  • ffeingol
    This would typically be a question for your hosting provider. Typically it would be mail.domain.tld for the incoming/outgoing mail server (replace domain.tld for your actual domain / top level domain)
    0
  • cPRex Jurassic Moderator
    @ffeingol is correct, but it's best to confirm the settings with your host so you have the most accurate information.
    0
  • cPRex Jurassic Moderator
    The test I always recommend is using telnet to try and connect from your local workstation to the server, as that would ensure you can connect to the mail ports your host has opened. If not, you may need to use alternative ports your host has setup for mail access.
    0
  • ffeingol
    I'd suggest trying webmail first (domain.tld/webmail) and see if you can get logged in. If that works, then you know that the password is correct. Is POP/IMAP working?
    0
  • cPRex Jurassic Moderator
    Thanks for the update - just to confirm, you *can* connect with a client, and you can download/receive messages fine, but you're not able to send, correct? If so, I believe we need to try the port testing I mentioned earlier to test the connection from your local system to the server with the mail ports. You'll want to check port 25 as that is the default port for sending messages in most cases.
    0
  • ffeingol
    Are you using any firewall (CSF etc.). Are you sure that 587 is open? @cPRex said, you can test with telnet (if you have it): telnet mail.tdomain.tld 587
    0
  • cPRex Jurassic Moderator
    @Zardiw - please keep all replies in this thread to avoid confusion. That indicates your local Windows machine is able to reach the server properly over the port you used to test, which I am assuming is port 25. Can you let me know the error message you're getting in your mail client?
    0
  • cPRex Jurassic Moderator
    SMTP is enabled on all cPanel servers by default. The piece of code you posted is the default SMTP banner from the mailserver, showing your connection is working properly. If there are other failures, they aren't included in that output.
    0
  • cPRex Jurassic Moderator
    Both the lines with the "220" message is normal - it's a standard banner that all Exim servers use that just says "we don't support spam" You haven't provided any logs yet that give a connection error, so I'm not sure why you can not connect. What error do you get in your mail client?
    0
  • cPRex Jurassic Moderator
    If you run this command as the root user on your server, you do not receive any output? ls -lah /var/log/maillog
    0

Please sign in to leave a comment.