Hi,
I have been using Email plugin for different cases and so far i used to send from configured email id. but now i want to sent from different id based on different scenarios.
Here is my configurations in Config.groovy
grails {
mail {
host = "smtp.gmail.com"
port = 465
username = "support@xxxxx.com" password = "xxxxxxx"
props = ["mail.smtp.auth":"true",
"mail.smtp.socketFactory.port":"465",
"mail.smtp.socketFactory.class":"javax.net.ssl.SSLSocketFactory",
"mail.smtp.socketFactory.fallback":"false"]
}
}
code in controller
mailService.sendMail {
to "xxxxxxx@gmail.com"
from "sales@xxxxx.com" subject "Test from different email Id "
html "Test from different email Id"
}
As per above code email should be send from "sales@xxxxx.com" but it is sending from "support@xxxxx.com".
As per document we can send from different email id
http://grails.org/plugin/mailmailService.sendMail {
to "fred@g2one.com","ginger@g2one.com"
from "john@g2one.com" cc "marge@g2one.com", "ed@g2one.com"
bcc "joe@g2one.com"
subject "Hello John"
body 'this is some text'
}
Any suggestions, questions to resolve this issue is really appreciated.
Thanks in advance
Lok
Cheers,
Lok