-1
사용자가 양식을 작성한 후 메일 보내기 옵션을 만들려고합니다. 이 이메일은 모든 고객의 양식 데이터가 있어야하며 관리자에게만 전송됩니다. Django Docs에 이어 메일을 보낼 수는 있지만 메일 템플리트는 사용자 정의 할 수 없습니다. 그것은 다음 줄을 in the docs의 코드Django는 내 사용자의 양식 데이터가 포함 된 전자 메일을 보내십시오.
subject, from_email, to = 'hello', '[email protected]', '[email protected]'
text_content = 'This is an important message.'
html_content = '<p>This is an <strong>important</strong> message.</p>',
msg = EmailMultiAlternatives(subject, text_content, from_email, [to])
msg.attach_alternative(html_content, "text/html")
msg.send()
당신이 "나는 메일 템플릿을 사용자 정의 할 수 없습니다"무엇을 의미합니까? 작동하지 않는 것은 무엇입니까? – solarissmoke
이메일에 사용자 데이터 가져 오기 –