[v2.0.0-rc1] How to set the "From" part of the E-Mails

Hi@everone

How can I set the “from” value for the e-mail?

        'host' => 'smtp-relay.gmail.com',
        'port' => 587,
        'timeout' => 30,
        'username' => '',
        'password' => '',
        'client' => null,
        'tls' => false,
        'url' => null,

I don’t need to use the username and password field, but I don’t know hat client and url is for. In which field I must enter the e-mailaddress of the system?

Can you try adding:

'from' => ['name' => 'email@yourdomain.com']

Let me know if this works, we’ll add this to the default config.
Ref. https://book.cakephp.org/3.0/en/core-libraries/email.html#configuration-profiles

Hi remy.

This is my config now:

// Email configuration.
'EmailTransport' => [
    'default' => [
        'from' => ['system@domain.com => 'Passdb'],
        'host' => 'smtp-relay.gmail.com',
        'port' => 587,
        'timeout' => 30,
        'username' => '',
        'password' => '',
        'client' => null,
        'tls' => false,
        'url' => null,
    ],
],

My settings on the relay from Google say, that every e-mail from my server with this “from” value will be accepted.
I only installed Sendmail and did not configure anything in it.
My Livesupport and my Board doesn’t have any problems with it.
The Mail.log says (admin[at]domain[dot]com is the user account):


Jan 16 18:12:07 pass sendmail[1951]: alias database /etc/mail/aliases rebuilt by admin
Jan 16 18:12:07 pass sendmail[1951]: /etc/mail/aliases: 1 aliases, longest 4 bytes, 14 bytes total
Jan 16 18:12:08 pass sm-mta[2015]: starting daemon (8.15.2): SMTP+queueing@00:10:00
Jan 16 18:12:21 pass sendmail[2150]: w0GICL7v002150: from=admin, size=28140, class=0, nrcpts=1, msgid=<201801161812.w0GICL7v002150@pass[dot]c.domain-com.internal>,
relay=root@localhost
Jan 16 18:12:21 pass sm-mta[2151]: w0GICLWU002151: from=<admin@pass[dot]c.domain-com.internal>, size=28335, class=0, nrcpts=1, msgid=<201801161812.w0GICL7v002150@pa
ss.c.frozenb-it.internal>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jan 16 18:12:21 pass sendmail[2150]: w0GICL7v002150: to=admin[at]domain[dot]com, ctladdr=admin (1002/1003), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=58140, r
elay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w0GICLWU002151 Message accepted for delivery)


I used ‘from’ => [‘system@domain.com’ => ‘Passdb’], because of:

https://book.cakephp.org/3.0/en/core-libraries/email.html and

'from' => array('passbolt@yourdomain.com' => 'Passbolt'), (from HowTo Install)

Hi.
I forgot a part of the message: The Problem No2

As you can see in the mail.log it seems to be that the settings are ignored.
Sendmail and Postfix doesn’t get anything except the Message and the “TO” values.

What can it be?

I changed now to Postfix and set in the settings an SMTP relay to Google, but passbolt does not give the “from” value to Postfix. not in this ‘from’ => array(‘passbolt@yourdomain.com’ => ‘Passbolt’) form and not in this ‘from’ => array(‘Passbolt’ => ‘passbolt@yourdomain.com’)

In the Logs is everytime
from=root@myhostname

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.