Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

371
Views
Flask Mail: ¿cómo agregar un nombre personalizado al remitente?

Estoy usando Flask mail para enviar correos electrónicos. Todo funciona bien, excepto que noté que el nombre del remitente es solo la primera parte del correo electrónico como (1) - "info" en este caso:

ingrese la descripción de la imagen aquí

¿Cómo agregar un nombre personalizado como (2): vea la captura de pantalla?

El código con el que estoy enviando correos electrónicos:

 def send_async_email(app, msg): with app.app_context(): mail.send(msg) def send_email(to, subject, template, **kwargs): app = current_app._get_current_object() msg = Message(app.config['MAIL_SUBJECT_PREFIX'] + ': ' + subject, sender=app.config['MAIL_DEFAULT_SENDER'] , recipients=[to]) msg.body = render_template(template + '.txt', **kwargs) msg.html = render_template(template + '.html', **kwargs) thr = Thread(target=send_async_email, args=[app, msg]) thr.start() return thr
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede configurar el remitente como tupla así:

 Message( sender=('Firstname Lastname', 'from@me.com') )
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!