Kirby3 and mailgun

I am using uniform and kirby to send a contact form via mailgun.

My understanding is you can no longer send using the mailgun api via uniforms service options. So I have added a transport option in the site config:

	'email' => [

		'transport' => [
			'type' => 'smtp',
			'port' => 587,
			'security' => true,
			'host' => 'smtp.mailgun.org',
			'auth' => true,
			'username' => 'postmaster@me.co.uk',
			'password' => '**',
		],

I now get:

There was an error sending the form: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Am i missing something? is it possible to send via the api?

Have you tried port 465?

yes, i have. Do you know if the security option means TSL or SSL?

It’s passing the security option directly as SMTPSecure on #L66, so you can try:

'port' => 587,
'security' => 'tls'

I have this setup working.

bingo! thanks so much :grinning:

@texnixe might be good to add this info in the kirby docs?

@_gareth_j Sure, but could you create an issue in the getkirby.com repo, please, so we can keep track?