PowerProtect smtp_send.py generates error: 'NoneType' object has no attribute 'encode'
Resumo: The PowerProtect Data Manager is used to protect the environment and "Support > Email Setup" is being configured to receive email notifications.
Este artigo aplica-se a
Este artigo não se aplica a
Este artigo não está vinculado a nenhum produto específico.
Nem todas as versões do produto estão identificadas neste artigo.
Sintomas
The Email Setup test email fails indicating to validate the Simple Mail Transfer Protocol (SMTP) details.
Error 104: Sending the test email failed. Socket error : mailserver.mydomain.com Verify the SMTP details and try again.
PowerProtect Data Manager contains the /usr/local/brs/bin/smtp_send.py script to help troubleshoot SMTP-related issues. The script fails to run and generates the following information:
admin@my-ppdm:~> /usr/local/brs/bin/smtp_send.py -HOST mailserver.mydomain.com -FROM test_email_address@dell.com -PORT 25 -ARGS True -S "PowerProtect Data Manager test email" -C plain -R test_email_address@dell.com
Traceback (most recent call last):
File "/usr/local/brs/bin/smtp_send.py", line 338, in <module>
main()
File "/usr/local/brs/bin/smtp_send.py", line 308, in main
outer.attach(MIMEText(args.body, args.content_type))
File "/usr/lib64/python3.4/email/mime/text.py", line 33, in {}init{}
_text.encode('us-ascii')
AttributeError: 'NoneType' object has no attribute 'encode' Causa
The smtp_send.py help shows that all commands are optional, but most of them are required:
admin@my-ppdm:~> /usr/local/brs/bin/smtp_send.py -h
usage: smtp_send.py [-h] [-HOST MAILSERVER] [-PORT PORT] [-USER USERNAME]
[-PASS PASSWORD] [-FROM MAILFROM] [-ARGS USEARGS]
[-R RECIPIENTS [RECIPIENTS ...]] [-S SUBJECT]
[-C CONTENT_TYPE]
[-T {MAIL_BODY_AS_ARGUMENT,MAIL_BODY_AS_ATTACHMENT,MAIL_BODY_FROM_FILE}]
[-p TIMEOUT] [--hide] [-F FILENAME | -B BODY]
optional arguments:
-h, --help show this help message and exit
-HOST MAILSERVER Mail server
-PORT PORT Mail port
-USER USERNAME Mail username
-PASS PASSWORD Mail password
-FROM MAILFROM Mail from
-ARGS USEARGS Use args
-R RECIPIENTS [RECIPIENTS ...]
Mail recipients
-S SUBJECT Mail subject
-C CONTENT_TYPE Content Type
-T {MAIL_BODY_AS_ARGUMENT,MAIL_BODY_AS_ATTACHMENT,MAIL_BODY_FROM_FILE}
Message type
-p TIMEOUT Timeout in minutes
--hide hide to field from recipients
-F FILENAME, --Files FILENAME
File to be attached
-B BODY, --Body BODY Message bodyResolução
All the options referenced must be used while using the smtp_send.py script instead of relying on the "help" command output. Example syntax and output:
admin@my-ppdm:~> /usr/local/brs/bin/smtp_send.py -HOST mailserver.mydomain.com -FROM test_email_address@dell.com -PORT 25 -ARGS True -T MAIL_BODY_AS_ARGUMENT -S "PowerProtect Data Manager test email" -B "This is a test email from a PowerProtect Data Manager appliance" -C plain -R test_email_address@dell.com
2023-11-08 18:05:10.150515 INFO : Sending email with subject : PowerProtect Data Manager test email
2023-11-08 18:05:10.866943 INFO : sending mail
2023-11-08 18:05:11.071116 INFO : result: {}
admin@my-ppdm:~>Mais informações
Required arguments:
-HOST MAILSERVER Mail server
-FROM MAILFROM Mail from
-ARGS USEARGS Use args
-R RECIPIENTS [RECIPIENTS ...]
Mail recipients
-S SUBJECT Mail subject
-C CONTENT_TYPE Content Type
-T {MAIL_BODY_AS_ARGUMENT,MAIL_BODY_AS_ATTACHMENT,MAIL_BODY_FROM_FILE}
Message type
-B BODY, --Body BODY Message bodyOptional arguments:
-h, --help show this help message and exit
-PORT PORT Mail port
-USER USERNAME Mail username
-PASS PASSWORD Mail password
-p TIMEOUT Timeout in minutes
--hide hide to field from recipients
-F FILENAME, --Files FILENAME
File to be attachedPropriedades do artigo
Número do artigo: 000219362
Tipo de artigo: Solution
Último modificado: 03 dez. 2025
Versão: 3
Encontre as respostas de outros usuários da Dell para suas perguntas.
Serviços de suporte
Verifique se o dispositivo está coberto pelos serviços de suporte.