Pictures in HTML mails

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pictures in HTML mails

pierrick.bena
Hi everybody !

I'm using this method to send HTML mails :
xwiki.mailsender.sendHtmlMessage(...) in a groovy script and it works
perfectly, but I have trouble with pictures.

Indeed, in the content of my mail, I have a <img> tag with a "src"
attribute pointing on a picture located on my xwiki.

When i'm logged on my XWiki, I can see the pictures when I open my
mail.

When I'm not logged on XWiki, I can't see pictures beacause I suppose
I need authentication : does somebody know how I could do to solve this
? I think I have to send a HTTP Authorization Header in the content of
my

 HTML mail in order to reach the picture but I don't know how to do, I
've tried with "http-equiv" in the <meta> tag but no success.


Thanks for your help !

Regards, Pierrick

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Pictures in HTML mails

Guillaume "Louis-Marie" Delhumeau
For me, you have 2 solutions:

- let the guest user access to your pictures by changing the rights.
- put the images directly in the attachments of the mail, and then refer
them with src="cid:image.jpg".

Regards,

Louis-Marie


2013/6/17 <[hidden email]>

> Hi everybody !
>
> I'm using this method to send HTML mails : xwiki.mailsender.**sendHtmlMessage(...)
> in a groovy script and it works perfectly, but I have trouble with pictures.
>
> Indeed, in the content of my mail, I have a <img> tag with a "src"
> attribute pointing on a picture located on my xwiki.
>
> When i'm logged on my XWiki, I can see the pictures when I open my mail.
>
> When I'm not logged on XWiki, I can't see pictures beacause I suppose I
> need authentication : does somebody know how I could do to solve this ? I
> think I have to send a HTTP Authorization Header in the content of my
>
> HTML mail in order to reach the picture but I don't know how to do, I 've
> tried with "http-equiv" in the <meta> tag but no success.
>
>
> Thanks for your help !
>
> Regards, Pierrick
>
> ______________________________**_________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users