Remove the "Install Client" from Welcome Email

Hi,
Im trying to remove the link to install the client from the welcome email.
How can this be done ??

Thanks

or even change the text and hyper link would be better ?

Go to
www.mydomain.com

Ok well I found the php connected to the welcome email
/var/www/html/nextcloud/settings/Mailer/NewUserMailHelper.php

I edited it to suit and this is the result

I tried to edit the php-file but could not succeed.
I tried to put /* and */ around the following lines but then all users got invisible.

How can I edit the file to remove this? Should I just remove the lines?

$emailTemplate->addBodyButtonGroup(
$leftButtonText,
$link,
$l10n->t(‘Install Client’),
$this->config->getSystemValue(‘customclient_desktop’, ‘https://nextcloud.com/install/#install-clients’)

I believe the sane way to do this is by creating an app that extends the OC\Mail\EMailTemplate class. Within this new class, override the addBodyButtonGroup method to add any buttons you wish.

class EMailTemplate extends OC\Mail\EMailTemplate {
   ...
	public function addBodyButtonGroup(
		$textLeft, $urlLeft,
		$textRight, $urlRight,
		$plainTextLeft = '',
		$plainTextRight = '') {

		// Omit the left button ("Install client") and only show the button that links to the instance
		if ($this->emailId === 'settings.Welcome') {
			parent::addBodyButton('My new button!', 'https://my.domain.tld/', 'My new button!');
			return;
		}
		parent::addBodyButtonGroup($textLeft, $urlLeft, $textRight, $urlRight, $plainTextLeft, $plainTextRight);
	}

}

change

$emailTemplate->addBodyButtonGroup

to

$emailTemplate->addBodyButton

and thats all

Operating system: Linux 5.4.0-74-generic #83-Ubuntu SMP Sat May 8 02:35:39 UTC 2021 x86_64

Webserver: Apache/2.4.41 (Ubuntu) (apache2handler)

Database: mysql 10.3.29

PHP version: 7.4.3

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, apcu, bcmath, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 21.0.2 - 21.0.2.1

Nextcloud fresh install:


Hello,
under:
/var/www/html/nextcloud/settings/Mailer/NewUserMailHelper.php
there is no settings folder anymore.

I also don’t find: " OC\Mail\EMailTemplate"

EDIT: Sorry now see this thread is about NC 16. I was coming here by search engine.
Now:

/var/www/html/nextcloud/lib/private/Mail
/lib/public/Mail

Hi,
I’m very new to Nextcloud, Linux and PHP.
I managed to set up a Nextcloud on a Raspberry Pi.

I was trying change the templates in

/var/www/nextcloud/lib/private/Mail
/lib/public/Mail

to remove the second button, but for I don’t see any changes in the welcome mail.

Can anyone explain a bit more step by step what I have to do to get rid of the second button, or to rename it?
Is it also possible to insert a custom welcome text in different languages?

Thanks

In NC25 I was able to remove the “Install Client” option from the Welcome email by setting custom locations for the clients to empty in my Nextcloud configuration.

‘customclient_desktop’ => ‘’,
‘customclient_android’ => ‘’,
‘customclient_ios’ => ‘’,