Skip to content
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

Add the creds_envvar() function #159

Merged
merged 5 commits into from
Mar 23, 2020
Merged

Add the creds_envvar() function #159

merged 5 commits into from
Mar 23, 2020

Conversation

rich-iannone
Copy link
Member

This adds the creds_envvar() credential helper function. It's a variation on creds() (manual specification of values). The difference here is that the password can be specified in terms of an environment variable, using Sys.getenv() internally to obtain the password value. The required value for the pass_envvar arg puts it at the top of the argument signature.

Fixes #149

@rich-iannone rich-iannone requested a review from jcheng5 March 20, 2020 16:34
R/creds_helpers.R Outdated Show resolved Hide resolved
R/creds_helpers.R Outdated Show resolved Hide resolved
Copy link
Member

@jcheng5 jcheng5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verbiage changes

jcheng5
jcheng5 previously approved these changes Mar 23, 2020
@rich-iannone rich-iannone merged commit e28748c into master Mar 23, 2020
@rich-iannone rich-iannone deleted the creds_envvar branch March 23, 2020 21:53
@mraess
Copy link

mraess commented Mar 27, 2020

Hey Rich,

I tried the creds_envvar() function but I'm getting this error even when supplying the password directly into the function and not via Sys.getenv()

Show in New WindowClear OutputExpand/Collapse Output
Error: The environment variable defined by pass_envvar doesn't exist.

This is my code:

blastula::creds_envvar(user = Sys.getenv("email_user"), host = "smtp.sendgrid.net", port = 587, pass_envvar = Sys.getenv("email_pass"))

Is there anything else I need to be doing?

@jcheng5
Copy link
Member

jcheng5 commented Mar 29, 2020

Try pass_envvar="email_pass"

@mraess
Copy link

mraess commented Mar 30, 2020

That worked! Thanks a lot!

@mraess
Copy link

mraess commented Apr 6, 2020

Oh one more question - is there a way to do custom css for the emails, i.e. change background color, add a logo in a corner, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature-request - password as function parameter
4 participants