Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
44 lines (41 sloc) 943 Bytes
metadata:
title: Send e-mail with attachment
short title: Mail
documentation: "https://docassemble.org/docs/functions.html#send_email"
example start: 3
example end: 4
---
objects:
- user: Individual
---
mandatory: True
question: |
So long, ${ user }!
subquestion: |
% if success_sending_email:
We sent an e-mail to your e-mail address.
% else:
Oops, for some reason we could not send an e-mail to you.
% endif
---
question: |
Please fill in the following information.
fields:
- Your First Name: user.name.first
- Your Last Name: user.name.last
- Your E-mail: user.email
datatype: email
- A Picture: the_file
datatype: file
---
code: |
success_sending_email = send_email(to=[user], template=hello_email, attachments=[the_file])
---
template: hello_email
subject: |
A picture for ${ user }
content: |
Hello, ${ user }!
Attached please find an incredibly *cool* picture.
From,
Your friend
You can’t perform that action at this time.