Drillster / drone-email

Drone plugin for sending email notifications
Apache License 2.0
45 stars 43 forks source link

Extended from configuration to support utf8 name #56

Closed tiggerlee2 closed 2 years ago

tiggerlee2 commented 2 years ago

Better support fromName that need encoding.

docker run --rm \
  -e PLUGIN_FROM_ADDRESS=drone@test.test \
  -e PLUGIN_FROM_NAME='Лев Николаевич Толстой' \
  -e PLUGIN_HOST=smtp.test.test \
  -e PLUGIN_USERNAME=drone \
  -e PLUGIN_PASSWORD=test \
  -e DRONE_REPO_OWNER=octocat \
  -e DRONE_REPO_NAME=hello-world \
  -e DRONE_COMMIT_SHA=7fd1a60b01f91b314f59955a4e4d4e80d8edf11d \
  -e DRONE_COMMIT_BRANCH=master \
  -e DRONE_COMMIT_AUTHOR=octocat \
  -e DRONE_COMMIT_AUTHOR_EMAIL=octocat@test.test \
  -e DRONE_BUILD_NUMBER=1 \
  -e DRONE_BUILD_STATUS=success \
  -e DRONE_BUILD_LINK=http://github.com/octocat/hello-world \
  -e DRONE_COMMIT_MESSAGE="Hello world!" \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  drillster/drone-email
silverwind commented 2 years ago

Can't one just specify Лев Николаевич Толстой <drone@test.test> as PLUGIN_FROM?

tiggerlee2 commented 2 years ago

@silverwind It will raise error when using PLUGIN_FROM directly

could not send email 1: gomail: invalid address "=?UTF-8?q?=D0=9B=D0=B5=D0=B2_=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B5?= =?UTF-8?q?=D0=B2=D0=B8=D1=87_=D0=A2=D0=BE=D0=BB=D1=81=D1=82=D0=BE=D0=B9_<?= =?UTF-8?q?fasongziliao@alimail.cf84.cn>?=": mail: missing @ in addr-spec
mjwwit commented 2 years ago

Alright, I'll get to testing this asap!