Embedding an image that is on a company network in an html email viewable by people not on the network

0

My automated test takes a screenshot that needs to get emailed to managers in my company. currently, the screenshot is stored on a Hudson test server and my html email has this line:

<img src=\"${BUILD_URL}/artifact/sonarReport.png\">

and then i send the email using :

mutt -e 'set content_type=text/html' -s "Latest Report"  -- ${EMAIL_LIST} < ${WORKSPACE}/email.html

The problem i face is that a lot of time these managers are on the road or on their phone and they would like to see that email. Given that this image is stored on a company server, the only way for them to see it is to VPN into the company network. They are not very happy with this, so is there any way to deliver the image in another way to them.

Putting the image on a public server is not an option. Also, they don't like to have the report as an attachment ( only embedded in the body is acceptable)

Codrguy

Posted 2014-05-16T22:42:11.223

Reputation: 185

Email it as an attachment. – Ƭᴇcʜιᴇ007 – 2014-05-16T22:44:57.457

Or copy it and past it in the email. – cliff2310 – 2014-05-16T22:53:54.027

this is an automated process, i cannot copy and paste. also i mentioned that attachment is not an option. – Codrguy – 2014-05-16T22:56:44.223

1@Codrguy Would it be okay if the attachment was displayed in-line in the body of the email by default? – Spiff – 2014-05-16T23:19:58.530

@Spiff if that's possible, sure. i like that idea. As long as it works in major mobile/desktop and web email clients that'd be a great solution. – Codrguy – 2014-05-16T23:31:24.683

Answers

0

This link provided exactly what i needed using java : http://www.jroller.com/eyallupu/entry/javamail_sending_embedded_image_in

Codrguy

Posted 2014-05-16T22:42:11.223

Reputation: 185

1

If attaching the image is not an option, and hosting it publicly is not an option, then viewing it outside your environment is impossible. If, however, attaching the image is okay (as opposed to attaching the report) then try this:

stack overflow question

Jens Ehrich

Posted 2014-05-16T22:42:11.223

Reputation: 805

Thanks, all they care about is seeing the report in the body and i don't it matter to them if i attach the image. Thanks for the link. – Codrguy – 2014-05-16T23:39:00.330