email-smtp
This module send a email using a SMTP server
Installation
dagger install github.com/ernesto27/daggerverse/email-smtp@v0.1.0
Entrypoint
Return Type
EmailSmtp
Example
dagger -m github.com/ernesto27/daggerverse/email-smtp@2645e9d37f8b6416a3fe83cf6a0ca6102c487bd9 call \
func (m *myModule) example() *EmailSmtp {
return dag.
EmailSmtp()
}
@function
def example() -> dag.EmailSmtp:
return (
dag.email_smtp()
)
@func()
example(): EmailSmtp {
return dag
.emailSmtp()
}
Types
EmailSmtp 🔗
send() 🔗
Example usage:
dagger call send-email \
--from="from@gmail.com" \
--to="someemail@gmail.com" \
--subject="Hello" \
--body="Hello, World!" \
--host="smtp.mailtrap.io" \
--port=587 \
--username env:SMTP_USERNAME \
--password env:SMPT_PASSWORD
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
from | String ! | - | From email address |
to | String ! | - | To email address |
subject | String ! | - | Email subject |
body | String ! | - | Email body |
host | String ! | - | SMTP server host |
port | Integer | 587 | SMTP server port |
username | Secret ! | - | SMTP username |
password | Secret ! | - | SMTP password |
Example
dagger -m github.com/ernesto27/daggerverse/email-smtp@2645e9d37f8b6416a3fe83cf6a0ca6102c487bd9 call \
send --from string --to string --subject string --body string --host string --username env:MYSECRET --password env:MYSECRET
func (m *myModule) example(ctx context.Context, from string, to string, subject string, body string, host string, username *Secret, password *Secret) string {
return dag.
EmailSmtp().
Send(ctx, from, to, subject, body, host, username, password)
}
@function
async def example(from_: str, to: str, subject: str, body: str, host: str, username: dagger.Secret, password: dagger.Secret) -> str:
return await (
dag.email_smtp()
.send(from_, to, subject, body, host, username, password)
)
@func()
async example(from: string, to: string, subject: string, body: string, host: string, username: Secret, password: Secret): Promise<string> {
return dag
.emailSmtp()
.send(from, to, subject, body, host, username, password)
}