Email strange behavior in Dataverse 6.2
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Hello everyone,
I'm experiencing strange behavior with email sending in Dataverse 6.2.
The site is: dataverse.myhost.org
The system email is: no-reply@emailservice.org
The email domain is different from the site host domain.
The Dataverse version is 6.2.
I've configured it with standard JVM options:
<jvm-options>-Ddataverse.mail.mta.ssl.enable=true</jvm-options>
<jvm-options>-Ddataverse.mail.mta.auth=true</jvm-options>
<jvm-options>-Ddataverse.mail.debug=true</jvm-options>
<jvm-options>-Ddataverse.mail.mta.port=465</jvm-options>
<jvm-options>-Ddataverse.mail.mta.host=smtp.emailservice.email</jvm-options>
<jvm-options>-Ddataverse.mail.mta.user=no-reply@emailservice.org</jvm-options>
<jvm-options>-Ddataverse.mail.mta.password=****</jvm-options>
<jvm-options>-Ddataverse.mail.system-email=no-reply@emailservice.org</jvm-options>
<jvm-options>-Ddataverse.mail.support-email=dataverse@myhost.org</jvm-options>
I can send notifications email successfully -I've tested this with email change notifications, and it works.
However, I cannot send emails from the "Support" form:
[2025-05-22T10:46:05.724+0000] [Payara 6.2023.8] [INFO] [] [] [tid: *ThreadID=87 *ThreadName=http-thread-pool::jk-connector(2)] [timeMillis: 1747910765724] [levelValue: 800] [[
com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Message Rejected: Invalid From address. Different emails [no-reply@emailservice.org](mailto:no-reply@emailservice.org) and [alfredo.cosco@gmail.com](mailto:myemail@gmail.com) found
Following this guide: https://guides.dataverse.org/en/6.2/developers/troubleshooting.html#configuring-troubleshooting-mail-host
I added the :SystemEmail parameter.
I reverted the configuration to the old standard approach, creating a javamail-resource with a command similar to this:
./asadmin create-javamail-resource --mailhost [[smtp.gmail.com](http://smtp.gmail.com/)] --mailuser [test\@test\.com] --fromaddress [test\@test\.com]
--property mail.smtp.auth=[true]:mail.smtp.password=[password]:mail.smtp.port=[465]:mail.smtp.socketFactory.port=[465]
:mail.smtp.socketFactory.fallback=[false]:mail.smtp.socketFactory.class=[javax.net.ssl.SSLSocketFactory] mail/notifyMailSession
Even with this configuration, I can send email change notifications, but I still cannot send emails from the support form.
In my opinion, the issue lies in the different handling of emails between the “Support form” and the notification emails.
Currently, I have another dataverse with the same version 6.2 that does not present issues.
The main difference is that the email domain is always the same and the service is provided by the institution, so it is all trusted in the institution domain.
Thanks,
Alfredo
p.s. Discussion at https://groups.google.com/g/dataverse-community/c/-dP3r5Tldps/m/TmJJ363mFgAJ
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Dataverse 6.2 Support form and compare its email path with the working email change notification path. Review the troubleshooting guide's mail configuration and reproduce the failure using different site and sender domains; done means the Support form can send successfully without an invalid From address.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100