Hi,
we are facing some issue while attaching a PDF in Email. Seems no errors in the script. Script running well but i didn't receive mail with PDF attachments.
here with find the code which we are using for your reference.
Hi,
we are facing some issue while attaching a PDF in Email. Seems no errors in the script. Script running well but i didn't receive mail with PDF attachments.
here with find the code which we are using for your reference.
Please post formatted code, not pictures of code. That way we don't have to type it all out again to test or edit in our answers.
Hi,
Please find the formatted code.
smtp = 'Alarm_Mail'
BuildHTML = "
Test
"params = {'Name': 'Sample_pdf'}
a = system.report.executeReport(path = "text",project = "Project_Name", parameters = params,fileType="pdf")
attachmentNames = ['text.pdf']
attachmentData=[a]
system.net.sendEmail(smtpProfile=smtp,fromAddr=sender, subject= subject,body = body,html=html,to=to,attachmentNames=attachmentNames,attachmentData=attachmentData)
You didn't format it. Please read the linked article and then you can edit your post to fix it.
Hi,
smtp = 'Alarm_Mail'
BuildHTML = "
Test
"
subject = 'test'
body = BuildHTML
to = ['sample_mailid@gmail.com']
sender = 'TestMail@pdf.com'
html = 1
params = {'Name': 'Sample_pdf'}
a = system.report.executeReport(path = "text",project = "Project_Name", parameters = params,fileType="pdf")
attachmentNames = ['text.pdf']
attachmentData=[a]
system.net.sendEmail(smtpProfile=smtp,fromAddr=sender, subject= subject,body = body,html=html,to=to,attachmentNames=attachmentNames,attachmentData=attachmentData)
Yes, Email settings are correct and Email profile also working. I have tested scheduled actions with the same report. only through scripting i didn't receive mail.
Hi,
Any updates???
Please let me know.