Open Kianoosh76 opened 6 years ago
You can pass auth_user and auth_password to send_mail, so just determine what those should be and pass them in:
if some_condition():
auth_user = 'user1'
auth_pass = 'pass1'
else:
auth_user = 'user2'
auth_pass = 'pass2'
mail.send_mail(..., auth_user=auth_user, auth_password=auth_pass, ...)
Hi, is it possible to specify the account we want to send mail from it? Because we may need different sender accounts(but their mail hosts are same) I mean Something similar to
auth_user
auth_password
input parameters in django builtinsend_mail
function