使用JMS和activeMq grails 3.0发送电子邮件
我正在尝试将我的项目从Grails2.1.1更新到Grails3.0.5 当我使用Grails2.1.1时 我像这样发送电子邮件使用JMS和activeMq grails 3.0发送电子邮件,grails,groovy,spring-jms,Grails,Groovy,Spring Jms,我正在尝试将我的项目从Grails2.1.1更新到Grails3.0.5 当我使用Grails2.1.1时 我像这样发送电子邮件 sendQueueJMSMessage("queue.sendEmailCC", [emailTo: emailTo, emailSubject: emailSubject, content: content]) 然后在resource.groovy中 jmsConnectionFactory(org.apache.activemq.ActiveMQConnecti
sendQueueJMSMessage("queue.sendEmailCC", [emailTo: emailTo, emailSubject: emailSubject, content: content])
然后在resource.groovy中
jmsConnectionFactory(org.apache.activemq.ActiveMQConnectionFactory) { brokerURL = "tcp://localhost:61616" }
因为Grails2.1.1和Grails3.0.5的配置不同,所以我在grails3.0.5中配置jmsConnectionFactory,如application.yml中所示
grails:
mail:
auth: Container
type: javax.mail.Session
"mail.smtp.host": smtp.gmail.com
"mail.smtp.port": 465
"mail.smtp.auth": true
"mail.smtp.user": abc1234@gmail.com
"password": abc
"mail.smtp.starttls.enable": true
"mail.smtp.socketFactory.class": javax.net.ssl.SSLSocketFactory
spring:
activemq:
brokerUrl: tcp://localhost:61616
pooled: true
然后我尝试运行发送电子邮件…我收到未知错误..但当我删除行“sendQueueJMSMessage(“…”)..”时,该错误不会再次出现
我该怎么办
我得到了这个错误
ERROR CifService - No signature of method: CifService.sendQueueJMSMessage() is applicable for argument types: (java.lang.String, java.util.LinkedHashMap) values: [queue.sendEmailCC,
[emailTo:abc.aries@gmail.com, emailSubject:Akyong - Reset Password, ...]]
但是sendQueueJMSMessage在grails 2.1.1中正常工作,我不知道为什么我不能发送电子邮件。但是在我尝试安装这个插件之后
compile "org.grails.plugins:mail:2.0.0.RC2"
我的代码运行正常
所以我想这是关于
邮件插件的我不知道为什么我不能发送电子邮件..但是在我尝试安装这个插件之后
compile "org.grails.plugins:mail:2.0.0.RC2"
我的代码运行正常
因此,我认为这是关于邮件插件的我在等待答案:(我在等待答案:(