mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-22 06:02:51 +00:00
c89d3965b7
PR to improve the Readme.md migrating the install task URL from master to v1beta1 Signed-off-by: ishani2412 <ishani.1613039@kiet.edu> |
||
---|---|---|
.. | ||
OWNERS | ||
README.md | ||
sendmail.yaml |
Send a message via SMTP server
This task sends a simple email to receivers via SMTP server
Install the Task and create a secret
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/v1beta1/mail/sendmail.yaml
Create a secret that has the SMTP server information
-
url: The IP address of the SMTP server
-
port: The port number of the SMTP server
-
user: User name for the SMTP server
-
password: Password for the SMTP server
-
tls: The tls enabled or not ("True" or "False")
Example server-secret.yaml
kind: Secret
apiVersion: v1
metadata:
name: server-secret
stringData:
url: "smtp.server.com"
port: "25"
user: "userid"
password: "password"
tls: "False"
Example kubectl command
kubectl apply -f server-secret.yam
Parameters
-
server: The name of the secret that has the SMTP server information
-
subject: Email subject (plain text)
-
body: Email body (plain text)
-
sender: Email sender email address
-
recipients: Email recipients email addresses (space delimited)
Usage
This TaskRun runs the Task to send an email to the receivers via the SMTP server.
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: mail-taskrun
spec:
params:
- name: server
value: server-secret
- name: subject
value: Hi, again!
- name: body
value: "Tekton email"
- name: sender
value: "<me@myserver.com>"
- name: recipients
value: "<him@hisserver.com> <her@herserver.com>"
taskRef:
name: sendmail