-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
Small e-mail fixes #1923
Small e-mail fixes #1923
Conversation
Hey admins! Can one of you let me know if it's safe to build this pull request? See https://alpha.sandstorm.io/grain/kB7bofATTL2jGuKSFwmqdA/GithubPRCommands for a list of commands. |
Hmm, it's clear the code does not match the comments, but I wonder if it is the code or the comments that is wrong. Maybe we actually intended to require that the grain specify an address matching one of the two, without any default? @jparyani do you remember? (The unrelated |
In documentation it says:
It does not "feel" like you have to set it, but you are allowed to set it? |
Yeah that line is really ambiguous, but the documentation was meant to be descriptive, not prescriptive, so that doesn't help us figure out what was the original intended behavior here... |
How does app figure out what is its valid outgoing address? For example, how can a Meteor app know that? Is this easy? Then we can require it to set the right from address. |
Apps normally call https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/hack-session.capnp#L35 |
Or to get the user's address, https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/hack-session.capnp#L63 Keep in mind |
Hm, and that is not available for Meteor apps, no? Is it even possible to send e-mails from Meteor apps? |
You can use node-capnp to make Cap'n Proto requests from Meteor apps. The documentation describes how to get at HackSessionContext: https://docs.sandstorm.io/en/latest/developing/email-from-apps/ |
const grainAddress = session._getAddress(); | ||
const userAddress = session._getUserAddress(); | ||
|
||
// First check if we're changing the from address, and if so, move it to reply-to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also removed this comment. It is not true at all.
fd1cab9
to
f0780b8
Compare
There could be a Meteor package for that. ;-) |
Thanks! |
Just some things I noticed while reading through the code.
Not tested.