Complete the code to import the EmailOperator from Airflow.
from airflow.providers.smtp.operators.email import [1]
The correct import is EmailOperator from airflow.providers.smtp.operators.email.
Complete the code to create an EmailOperator task named 'send_email'.
send_email = EmailOperator(task_id='send_email', to='user@example.com', subject='Test', [1]='This is a test email', dag=dag)
The EmailOperator uses body to specify the email body content.
Fix the error in the EmailOperator initialization by completing the missing parameter for the sender email.
send_email = EmailOperator(task_id='send_email', to='user@example.com', subject='Test', body='Hello', [1]='noreply@example.com', dag=dag)
The correct parameter to specify the sender email is from_email.
Fill both blanks to create an EmailOperator that sends to multiple recipients and includes a CC address.
send_email = EmailOperator(task_id='send_email', to=[1], cc=[2], subject='Hello', body='Hi there', from_email='noreply@example.com', dag=dag)
The to parameter accepts a list of recipients, and cc also accepts a list of emails.
Fill all three blanks to create an EmailOperator with attachments, a custom mime subtype, and a reply-to address.
send_email = EmailOperator(task_id='send_email', to='user@example.com', subject='Report', body='See attached', files=[1], mime_subtype=[2], reply_to=[3], from_email='noreply@example.com', dag=dag)
The files parameter takes a list of file paths, mime_subtype is usually 'mixed' for attachments, and reply_to is the email address for replies.