Python client library for Postmark API
Hi! So I'm trying to send a simple mail for testing purposes, however It is not letting me using any ENV variables or any sort of variable for that matter: ``` def sendmail(): postmark = PostmarkClient(server_token=os.getenv('POSTMARK_API_KEY')) postmark.emails.send( From='[email protected]', To='[email protected]', Subject='Postmark', HtmlBody='Hi', ) ``` I am getting the error: ``` AssertionError: You have to provide token to use Postmark API ``` If I put it between straight away between ''s it works however. I can also **not** declare it before such as: ``` server_token=os.getenv('POSTMARK_API_KEY') def sendmail(): postmark = PostmarkClient(server_token=server_token) postmark.emails.send( From='[email protected]', To='[email protected]', Subject='Postmark', HtmlBody='Hi', ) ``` As this returns the same error. Is this the intended behaviour? What could I do as an alternative? Cheers
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by mtthidoteu and has received 1 comments.