添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi currently trying out Axelor, great looking software hoping to get all the elements I require working.

The email situation seems a bit poor it is a shame that here isn’t an Outlook or Thunderbird plugin to complement Axelor as this would win it for me.

currently having trouble trying to send email I’m getting ‘sender address must contain a domain’ (see below) anyone have any idea why this is I am putting the full from email address in.

nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 501 <teststaff_01>: sender address must contain a domain

    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2267)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1758)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1257)
    at javax.mail.Transport.send0(Transport.java:255)
    at javax.mail.Transport.send(Transport.java:124)
    at com.axelor.mail.MailBuilder.send(MailBuilder.java:418)
    at com.axelor.mail.MailBuilder.send(MailBuilder.java:430)
    at com.axelor.apps.message.service.MessageServiceImpl$1.call(MessageServiceImpl.java:329)
    at com.axelor.apps.message.service.MessageServiceImpl$1.call(MessageServiceImpl.java:325)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Caused by: com.sun.mail.smtp.SMTPSenderFailedException: 501 <teststaff_01>: sender address must contain a domain

    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1767)
    ... 11 more

I am having the same issue (v6.0.4). In my case instead of the « from address » the username is being used instead. « From address » is [email protected] while username is crm_euroscope, so as can be seen in the logs it is clearly not the case of stripping the domain name but rather the wrong field is being used.

Error log
javax.mail.SendFailedException: Invalid Addresses;
  nested exception is:
	com.sun.mail.smtp.SMTPAddressFailedException: 404 4.5.2 <euroscope_crm>: Sender address rejected: need fully-qualified address
	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:2079)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1301)
	at javax.mail.Transport.send0(Transport.java:255)
	at javax.mail.Transport.send(Transport.java:124)
	at com.axelor.mail.MailBuilder.send(MailBuilder.java:423)
	at com.axelor.mail.MailBuilder.send(MailBuilder.java:435)
	at com.axelor.apps.message.service.SendMailQueueService.lambda$submitMailJob$1(SendMailQueueService.java:71)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 404 4.5.2 <euroscope_crm>: Sender address rejected: need fully-qualified address
	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1979)
              

I think this is a bug. In com.axelor.apps.message.service.MessageServiceImpl.sendByEmail(), line 266:

com.axelor.mail.MailAccount account = 
    new SmtpAccount(
        mailAccount.getHost(),
        mailAccount.getPort().toString(),
        mailAccount.getLogin(),
        mailAccountService.getDecryptPassword(mailAccount.getPassword()),
        mailAccountService.getSecurity(mailAccount));

creates a new SmtpAccount and completely ignores the from address in account. com.axelor.apps.message.service.MailAccountServiceImpl.getMailAccount() does it properly. Changing the above call to:

com.axelor.mail.MailAccount account = mailAccountService.getMailAccount(mailAccount);

fixes the issue.