Cannot add email to profile

[details=“Support intro”]

Nextcloud version (eg, 12.0.2): V13.0.0

Server Information

Hosting Package BluePro
Server Name box5142
cPanel Version 66.0 (build 35)
Apache Version 2.4.29
PHP Version 7.0.27
MySQL Version 5.6.32-78.1
Architecture x86_64
Operating System linux
Shared IP Address 162.241.224.179
Path to Sendmail /usr/sbin/sendmail
Path to Perl /usr/bin/perl
Perl Version 5.10.1
Kernel Version 3.10.0-693.11.6.1.ELK.el6.x86_64

The issue you are facing:

I cannot seem to update the email in my profile. Log in is normal without error. Now I am trying to update the email server info and my personal settings. The error suggests something about expecting integer in item 3 of mailer? Also the server cannot send a test as it seems to demand the email address in my profile - which I cannot save.

I can update other fields within the profile. I can also update the password.

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Select Notification top right menu (Add your profile information. For example your email…)
  2. Select link in notification
  3. Select “Email Field” enter new email address (sometime it turns yellow and sometimes not… never a checkmark appears
  4. refresh and the email is not updated

The output of your Nextcloud log in Admin > Logging:

Level
App	Message	Time
Error	PHP	idn_to_ascii() expects parameter 3 to be integer, string given at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500
Error	PHP	Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500
Error	PHP	idn_to_ascii() expects parameter 3 to be integer, string given at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500
Error	PHP	Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500
Error	PHP	idn_to_ascii() expects parameter 3 to be integer, string given at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500
Error	PHP	Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500
Error	PHP	idn_to_ascii() expects parameter 3 to be integer, string given at /home1/gbranlaw/public_html/nxtcld/lib/private/Mail/Mailer.php#212	2018-02-12T08:57:03-0500


The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

text/x-generic config.php ( PHP script text )

<?php $CONFIG = array ( 'instanceid' => 'oc1lpvsj6k00', 'passwordsalt' => '8mftL++qnuWFoBYjAOWGoJxWDfEmcS', 'secret' => 'xU5sSjrxHzmUt2GKA07BZFSg0SCBd32rwXGcyNl5IvZ0fTDy', 'trusted_domains' => array ( 0 => 'gbranlaw.com', ), 'datadirectory' => '/home1/gbranlaw/public_html/nxtcld/data', 'overwrite.cli.url' => 'http://gbranlaw.com/nxtcld', 'dbtype' => 'mysql', 'version' => '13.0.0.14', 'dbname' => 'gbranlaw_nxtcld', 'dbhost' => 'localhost:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'gbranlaw_nxtcld', 'dbpassword' => 'abc2018!', 'installed' => true, 'updater.secret' => '$2y$10$jUE3TVKtmNg.U99d8a0Ov.1CB7lRUnoCS8zesMxYjm19zMGDRZKL2', 'maintenance' => false, 'theme' => '', 'loglevel' => 2, 'mail_from_address' => 'schaeferg', 'mail_smtpmode' => 'smtp', 'mail_smtpauthtype' => 'LOGIN', 'mail_domain' => 'gbranlaw.com', 'mail_smtphost' => 'mail.gbranlaw.com', 'mail_smtpport' => '465', 'mail_smtpsecure' => 'ssl', 'mail_smtpauth' => 1, 'mail_smtpname' => 'mail.gbranlaw.com', 'mail_smtppassword' => 'xvxvxv', ); ``` The output of your Apache/nginx/system log in `/var/log/____`: ``` PASTE HERE ```

I am running into the same problem after having upgraded Nextcloud from 12.3.3 to the actual new stable version 13.
The problem equally occurs when one tries to submit mail. Additional error message is:

Beim Senden der E-Mail ist ein Problem aufgetreten. Bitte überprüfe Deine Einstellungen. (Fehler: Address in mailbox given [xx@] does not comply with RFC 2822, 3.6.2.) The error log reflects same PHP error messages as indicated by donshepard:

|Error|PHP|idn_to_ascii() expects parameter 3 to be long, string given at /…/nextcloud/lib/private/Mail/Message.php#77|2018-02-19T11:40:20+0100|

|Error|PHP|Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed ‘INTL_IDNA_VARIANT_UTS46’ at /…/nextcloud/lib/private/Mail/Message.php#77|2018-02-19T11:40:20+0100|

|Error|PHP|idn_to_ascii() expects parameter 3 to be long, string given at /…/nextcloud/lib/private/Mail/Mailer.php#212|2018-02-19T11:40:20+0100|

|Error|PHP|Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed ‘INTL_IDNA_VARIANT_UTS46’ at /…/nextcloud/lib/private/Mail/Mailer.php#212|2018-02-19T11:40:20+0100|

Problem seems to be related to UTS46 support in libicu.
See also --> https://github.com/nextcloud/activity/issues/239

Any advice how to solve this in nextcloud as there is no current support for higher libicu versions for Centos 6.9. See umgfoin’s comment of January 15th.

This problem not only inhibits mail address change, but any mail submission as well as sharing. Nextcloud is not really efficiently useable like this!

1 Like

Hi,

Another user posted a solution on Github:

Just be aware that this solution has not been approved by the developers yet, as it was just posted, and it requires manual changes.

1 Like

i’d like to mark this solved as it seems to be an external problem.

I kind of agree, because I didn’t see this problem on my productive server and neither on my test server. So it’s not really an issue with Nextcloud.
However, I believe it’s good idea to avoid this issue by this little code change in Nextcloud. Sounds very reasonable to check if the constants are really defined instead of blindly using them :slight_smile:

Shall we rather wait for an official fix from NC devs, mention it here and then mark it as solved? (Just thinking)

1 Like

usually i’d agree on that but as https://github.com/nextcloud/activity/issues/239 shows @nickvergessen already knows about this problem and closed the issue…

Code change works like a charm! Alls issues resolved!
Thanks Shmu for the hint and your quick response!

I am aware that this is an outside error, however if Nextcloud 13 assumes UTS46 support in libicu (i.e. libicu > 4.2), this has to be filed in the system requirements. I also would assume appropriate constant definition and upward compatibility of newer versions. Fully concur with Schmu’s statement and would very much encourage to have this small change approved and embedded into next updates.

I think this problem and the related ones can be now considered as “closed”

2 Likes