Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Send Email with Python Script

I want to send an email using Python Script, I run the code in edit properties of the script and it said "mail send" but i don't receive the email.

"Correo enviado
Script duration: 0.1s."

# -*- coding: utf-8 -*-
import smtplib

remitente = "Admin BI<susan.manchego@somosoh.pe>"
destinatario = "Sistemas BI <susan.manchego@gmail.com>"
asunto = "E-mal HTML enviado desde Matillion con Python"
mensaje = """Hola!<br/> <br/>
Este es un <b>e-mail</b> enviando desde <b>Python</b>
"""

email = """From: %s
To: %s
MIME-Version: 1.0
Content-type: text/html
Subject: %s

%s
""" % (remitente, destinatario, asunto, mensaje)
try:
smtp = smtplib.SMTP('localhost')
smtp.sendmail(remitente, destinatario, email)
print "Correo enviado"
except:
print """Error: el mensaje no pudo enviarse.
Compruebe que sendmail se encuentra instalado en su sistema"""

1 Community Answers

Matillion Agent  

Ian Funnell —

Hi Susan,

Please can you attach an export of your Matillion job?

Best regards,
Ian

Post Your Community Answer

To add an answer please login