Email error - "d12345" is not a valid email address

Hi :wink:

I use an SMTP server where the user name is not an e-mail address.

  'email' => [
    'transport' => [
      'type' => 'smtp',
      'host' => 'mail.agenturserver.de',
      'port' => 465,
      'security' => true,
      'auth' => true,
      'username' => 'd12345',
      'password' => ''
    ]
  ],

With the data I now get the following error when I send the form.

"d12345" is not a valid email address

What needs to be changed here?

Thanks much!
Patrick

Do you have a stack trace? Sure it comes from the username in those transport settings?

Oh, you mean Kirby doesn’t necessarily need an e-mail address? Then I’ll look elsewhere - probably an SMTP thing…I’ll check that out.

It seems like you’re trying to set the “from” email to the username. In this case, it has to be set separately.

If you’re sending email manually, you can just specify a different from email in the function call:

If you’re using DreamForm, which by default uses the username, you can set the from email manually in the config:

<?php

return [
	'tobimori.dreamform' => [
		'actions' => [
			'email' => [
				'from' => [
					'email' => 'xxx@example.com',
					'name' => 'Sender Name'
				]
			]
		]
	]
];
1 Like

Hey Tobias,

Thank you so much - you made my day :wink:

Everything is going perfectly - with the great DreamForm anyway!

Best

Patrick