1

I use a script where I can manage mail configuration for Mailgun. Configuration seem to be OK but the register mail doesn't send from Mailgun logs.

I can use SMTP or sendmail or email protocol. I want to use the SMTP protocol with Mailgun credentials and TLS activated.

Have you got an idea if I must configure Debian 9 Apache2 server to send email from SMTP?

I've this response when I send an email:

220 ak47 ESMTP ready 
hello: 250-ak47
250-AUTH PLAIN LOGIN
250-SIZE 52428800
250-8BITMIME
250-ENHANCEDSTATUSCODES
250-SMTPUTF8
250 STARTTLS
starttls: 220 2.0.0 Start TLS
hello: 250-ak47
250-AUTH PLAIN LOGIN
250-SIZE 52428800
250-8BITMIME
250-ENHANCEDSTATUSCODES
250 SMTPUTF8
from: 250 2.0.0 OK
to: 550 5.7.1 Relaying denied
The following SMTP error was encountered: 550 5.7.1 Relaying denied 
quit: 221 See you later. Yours truly, Mailgun
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.
Date: Thu, 16 Aug 2018 18:01:00 +0200
From: "Site Name" <contact@domain.com>
Return-Path: <contact@domain.com>
To: contact@domain.com
Subject: =?UTF-8?Q?Message=20from=20SiteName?==?UTF-8?Q?cud?=
Reply-To: <contact@domain.com>
User-Agent: CodeIgniter
X-Sender: contact@domain.com
X-Mailer: CodeIgniter
X-Priority: 1 (Highest)
Message-ID: <5b759fbc2c3ea@domain.com>
Mime-Version: 1.0
  • 1
    It is not the problem of your mail sender, it is the problem of the mail server you are connecting. More exactly, the mail server doesn't want to be an outgoing SMTP server for you, it may have many reasons but the most likely is that you did not authenticate. – peterh Aug 16 '18 at 17:44
0

I found my mistake...

I use dash everywhere in my configurations, example smtp-password instead of smtp_password.

Problem solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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