forked from lcalisto/py_pgmail
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.sql
More file actions
20 lines (19 loc) · 673 Bytes
/
Copy pathexample.sql
File metadata and controls
20 lines (19 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SELECT py_pgmail(
'sentFromEmail@whatever.com', -- from
array['dest@email.com','dest2@email.com'], -- to
array['cc@email.com','cc2@email.com','cc3@email.com'], -- cc
array['bcc@email.com','bcc2@email.com','bcc3@email.com'], -- bcc
'My subject', -- subject
'<USERNAME>', -- login
'<PASSWORD>', -- password
'Text message! This is an email sent from a database!', -- msg_text
'<!DOCTYPE html>
<html>
<body>
<p>html message! This is an email sent from a database!</p>
</body>
</html>', -- msg_html
'attachment.csv', -- filename
'/foo/bar/', -- filepath
'smtpServer.whatever.com' -- smtp_server
);