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" <[email protected]>
Return-Path: <[email protected]>
To: [email protected]
Subject: =?UTF-8?Q?Message=20from=20SiteName?==?UTF-8?Q?cud?=
Reply-To: <[email protected]>
User-Agent: CodeIgniter
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 1 (Highest)
Message-ID: <[email protected]>
Mime-Version: 1.0
1
  • 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, 2018 at 17:44

1 Answer 1

0

I found my mistake...

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

Problem solved.

You must log in to answer this question.

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