Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーがダウンロードできるWebページのPDFを作成するためのコードがあります。このPDFをAmazonSESを使用してメールで添付ファイルとして送信したいと思います。
前もって感謝します!
/tmp/hello.pdf のようなサーバー上の一時的な場所に PDF を出力/保存し、電子メールに添付します。
from django.core.mail import EmailMessage email = EmailMessage('Hello', 'Body goes here', 'from@example.com', ['to1@example.com']) email.attach_file('/tmp/hello.pdf') email.send()
G