# X-pack scheduling email attachment issue

**URL:** <https://discuss.elastic.co/t/x-pack-scheduling-email-attachment-issue/48772>\
**Category:** Elasticsearch\
**Created:** [April 29, 2016, 7:05am UTC](https://discuss.elastic.co/t/x-pack-scheduling-email-attachment-issue/48772 "2016-04-29T07:05:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![udaykirankona](https://avatars.discourse-cdn.com/v4/letter/u/ac91a4/32.png) [@udaykirankona](https://discuss.elastic.co/u/udaykirankona)\
**Post date:** [April 29, 2016, 7:05am UTC](https://discuss.elastic.co/t/x-pack-scheduling-email-attachment-issue/48772/1 "2016-04-29T07:05:50Z")

</div>

Hi,

I am using x-pack alpha version. iam able to send mails but when I am trying to schedule the pdf report attachment to email. I am getting following error

[2016-04-29 12:26:17,404][ERROR][watcher.actions.email.service.attachment] Error executing HTTP request: [host[192.168.4.127], port[5601], method[GET], path[//app/reporting/visualization/Sample\_report]: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]  
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

my watcher action config as follows,

"actions": {  
"send\_email": {  
"email": {  
"to": ["client@xxx.com", "client@xxx.com"],  
"subject": "Cluster Status",  
"body": "Cluster status is YELLOW",  
"attachments" : {  
"Sample\_report.pdf" : {  
"http" : {  
"content\_type" : "application/pdf",  
"request" : {  
"url": "[https://localhost:5601//app/reporting/visualization/Sample\_report?\_g=(refreshInterval:(display:'5%20seconds',pause:!f,section:1,value:5000),time:(from:now%2Fd,mode:quick,to:now%2Fd)](https://localhost:5601//app/reporting/visualization/Sample_report?_g=(refreshInterval:(display:'5%20seconds',pause:!f,section:1,value:5000),time:(from:now%2Fd,mode:quick,to:now%2Fd)))&\_a=(filters:!(),linked:!f,query:(query\_string:(analyze\_wildcard:!t,query:'\*')),uiState:(),vis:(aggs:!((id:'1',params:(),schema:metric,type:count),(id:'2',params:(customInterval:'2h',extended\_bounds:(),field:trigger\_event.triggered\_time,interval:auto,min\_doc\_count:1),schema:bucket,type:date\_histogram),(id:'3',params:(field:result.actions.status,order:desc,orderBy:'1',size:5),schema:bucket,type:terms)),listeners:(),params:(perPage:10,showMeticsAtAllLevels:!f,showPartialRows:!f),title:Sample\_report,type:table))"  
}  
}  
},  
"data.yml" : {  
"data" : {  
"format" : "yaml"  
}  
}  
}  
}  
}  
}

my config in elasticsearch.yml is as follows,

watcher.actions.email.service.account:  
outlook\_account:  
profile: outlook  
email\_defaults:  
from: 'xxxxx\>'  
smtp:  
auth: true  
starttls.enable: true  
host: [smtp.xxx.com](http://smtp.xxx.com)  
port: 000  
user: [xxxx@xxx.com](mailto:xxxx@xxx.com)  
password: xxx  
ssl.trust: [smtp.xxx.com](http://smtp.xxx.com)

Please help me to resolve this.

Thanks,  
Uday.K

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:41pm UTC](https://discuss.elastic.co/t/x-pack-scheduling-email-attachment-issue/48772/2 "2017-07-06T13:41:08Z")

</div>


