-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From Address Not Correct #63
Comments
@aaronhunter1088 isn't the format I think I see the problem. When you use GMail as your SMTP it will force your sender to be that of the GMail account. Sendgrid, AWS or any other service should be useful. |
@sbglasius This still feels like a plugin issue. Why should it matter what SMTP server I use (GMail, or Live, or etc.) The values I supply in the closure should remain independent from the settings values given. Also, I mentioned I have tried with two programs. The other program not mentioned here, uses GMail Services for their email, however the email still has the business domain, not GMail. I shouldn't need to open a new GMail account just to end up forwarding those emails to my primary one. |
@aaronhunter1088 |
@sbglasius Both emails, the main and alias, are verified. I can send and reply to both from my phone or laptop. It is only when I use the grails plugin where I notice it strictly uses the username from the settings. I have written tests as well that does verify the |
@aaronhunter1088 Ok, perhaps your
|
@sbglasius While I appreciate the appropriate format to provide a name to be visible instead of the |
@aaronhunter1088 this small example shows that it works: https://github.com/sbglasius/mail-plugin-example The bottom two messages are with sbglasius@gmail.com, the middle two are with soeren@glasius.dk (alias on sbglasius@gmail.com) and the top two are obviously not right, as they are sent with sbglasius@gmail.com (as expected). I often find it enlightening to simply my problem to a very tiny project. In this case you can start it with Your test, which mostly seems to test the mocking framework as pretty much everything in there is mocked out. I suggest that you change it to an integration-test, using the green-mail plugin. While I did not fix your problem, I believe that the Mail plugin is working as intended, and that the error lies hidden somewhere in a configuration. If not, the code is open and you're more than welcome to submit a pull-request with a bugfix. |
@sbglasius I cloned your project, replaced the configurations with my username and password to connect, updated the sendMailFrom method to test different Here is a screenshot of one of the emails that sets the subject specifically to be sent from a specific Edit: Btw, I do appreciate all the help. I wasn't expecting this and is greatly appreciated. :) |
I am using the grails mail service to send mail and I am noticing that when running in production environment, the from address is using the username defined in the settings and not what I define in the sendMail closure.
This is my closure:
I have tried this in two separate applications and neither are working.
Additionally, I would like to use an email alias and that is also not working. I have tried using my alias account and it works just fine in normal situations, but not with the grails mail plugin. I suspect it's falling under the same issue. The from address supplied to the closure uses my username defined in the settings.
One question I have: I have tried the following closure to hide the email, to show a "name" instead, only revealing the email if I click on the name, but the from address only results in the following: "Mixology aaronhunte@gmail.com". The from address is still visible. Is this something I can control using the plugin? Or is this a mail server setting I need to enable?
I have provided screen shots of my environment, and the two emails. (Note: The name, test userr, is correct. I updated it one day and just never changed it)
When running in development: From email is correct.
When running in production: I'd expect the from to be "noreply@mixology.com". Instead it is using my username defined in the settings.
Mail Settings:
My environment:
The text was updated successfully, but these errors were encountered: